Install Docker on AWS

aws-docker

First thing first. Launch an instance with the Amazon Linux AMI and Connect to your instance.

Install Docker

Update the installed packages and package cache on your instance.

sudo yum update -y

Install Docker and Start the service.

sudo yum install -y docker
sudo service docker start

Add the ec2-user to the docker group so you can execute Docker commands without using sudo.

sudo usermod -a -G docker ec2-user

Install Docker Compose


sudo curl -L "https://github.com/docker/compose/releases/download/1.11.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

Apply executable permissions to the binary

sudo chmod +x /usr/local/bin/docker-compose

Log out and log back in again to pick up the new docker group permissions.


docker-compose --version
docker --version

References:
http://docs.aws.amazon.com/AmazonECS/latest/developerguide/docker-basics.html
https://docs.docker.com/compose/install/