Pages

Thursday, June 22, 2017

run docker 1.9.1 on aws ec2 ubuntu 16.4 instance

asciicast
Download docker binary
bash
ssh ubuntu@ec2-54-154-81-176.eu-west-1.compute.amazonaws.com
sudo su - &&
wget https://get.docker.com/builds/Linux/x86_64/docker-1.9.1 &&
chmod +x docker-1.9.1
mv ./docker-1.9.1 /usr/bin/docker

run docker daemon:

docker 1.9.1 was a single binary, so dockerd was not avialble yet
to run docker daemon you should use docker daemon
docker daemon -H 0.0.0.0:2375 to make the docker daemon listen to an ip or port.
and to run it on background you could use nohup as
bash
sudo nohup docker daemon -H 0.0.0.0:2375 > dockerd.log 2>&1 &

run docker client:

you will use the same docker binary as a client as docker run
docker -H tcp://0.0.0.0:2375 pull alpine:3.4, to not mention the -H flag where docker daemon is listining to, you could define
bash
export DOCKER_HOST=tcp://0.0.0.0:2375
docker pull alpine:3.4

Done.

No comments:

Post a Comment