How To Install Docker On Amazon Linux AMI
- Create EC2 with Amazon Linux AMI
- Login to your EC2 with PuTTY
- Do an update of Amzon Linux
sudo yum update
- Now for installing docker run below command:
sudo yum install -y docker
- Give permission
sudo usermod -a -G docker ec2-user
- Start Docker Service
sudo service docker start
- Run below command to get docker service up automatically after reboot:
sudo chkconfig docker on
- Optionally, create a new user for Docker management and add him to Docker (default) group
useradd dockeradmin passwd dockeradmin usermod -aG docker dockeradmin