This page works as expected if I choose Ubuntu 14.04 image.
https://docs.docker.com/engine/installation/cloud/cloud-ex-aws/
But If I choose Amazon Linux AMI, (the first one in the list shown in the image) then I am not able to install 1.12 version of docker.
I can however install older version using ...
yum install docker
But I am trying to install the latest 1.12 version on Amazon Linux AMI. Any suggestion will be appreciated.
I managed to get Docker 1.12.2 running on Amazon Linux. Here are the steps I took:
Download the version of Docker you want to your Amazon Linux instance (as a gzipped tar), and extract it. This creates a directory called docker/ containing Docker binaries.
wget https://get.docker.com/builds/Linux/x86_64/docker-1.12.2.tgz
tar -xvzf docker-1.12.2.tgz
Move all the Docker binaries into /usr/local/bin.
sudo mv docker/* /usr/local/bin/
You need to run a script called cgroupfs-mount (as superuser) before starting up the Docker daemon. The easiest way to get this script is by cloning the git repo containing it.
git clone https://github.com/tianon/cgroupfs-mount
sudo mv cgroupfs-mount/cgroupfs-mount /usr/local/bin/
Change to the superuser and make sure that /usr/local/bin/ is in your path (on Amazon Linux at least this is not the case by default).
sudo su
export PATH=/usr/local/bin:$PATH
Now you can run the cgroupfs-mount script and start the Docker daemon (as a background process).
cgroupfs-mount
dockerd &
You can call regular Docker commands (e.g. docker pull) as any user who belongs to the docker group, while dockerd is running. Missing from these installation steps is having cgroupfs-mount and dockerd be automatically run at start up time.
As an aside, I would recommend avoiding Amazon Linux if at all possible and using a mainstream distro like Ubuntu or CentOS instead, which seem to have much better support for Docker.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With