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.