Skip to content

Instantly share code, notes, and snippets.

@sajayantony
Last active August 6, 2018 07:07
Show Gist options
  • Save sajayantony/5014735a9881800d3cd1bbfb61e14866 to your computer and use it in GitHub Desktop.
Save sajayantony/5014735a9881800d3cd1bbfb61e14866 to your computer and use it in GitHub Desktop.
Install Docker Specific version of Docker

Using Docker for validating different versions of docker

For this it's usually easier to run docker as a privileged container and install binaries into it.

docker pull ubuntu
docker run --rm -it --privileged

Install Docker from binaries.

Refer instructions here - https://docs.docker.com/install/linux/docker-ce/binaries/

Install iptables for docker. I've also included lsb-core since I always want to run lsb_release to see ubuntu release details and also tmux since you need multiple terminals to run the daemon and the client. Not a fan of running dockerd detached.

apt-get update
apt-get upgrade
apt-get install iptables lsb-core tmux
tmux 

Download docker binaries from https://download.docker.com/linux/static/stable/x86_64/

Also export the location to path since it looks for the docker-containerd

mkdir /root/docker
cd /root/docker
curl -O https://download.docker.com/linux/static/stable/x86_64/docker-17.03.0-ce.tgz
tar xzvf  docker-17.03.0-ce.tgz
cd ./docker
export PATH=/root/docker/docker:$PATH

For version 1.7.1

This is the older version with the --email flag.

mkdir ~/docker 
cd ./docker
curl -O https://get.docker.com/builds/Linux/x86_64/docker-1.7.1.tgz
tar xvf docker-1.7.1.tgz
...
cd ./usr/local/bin
./docker login -u sajayeus -p $PASSWORD -e [email protected] sajayeus.azurecr.io
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment