Created
September 29, 2017 06:31
-
-
Save gongzili456/007878c96f954dd5ea913954d31f5635 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To get Docker running on the AWS AMI you should follow the steps below (these are all assuming you have ssh'd on to the EC2 instance). | |
Update the packages on your instance | |
[ec2-user ~]$ sudo yum update -y | |
Install Docker | |
[ec2-user ~]$ sudo yum install docker -y | |
Start the Docker Service | |
[ec2-user ~]$ sudo service docker start | |
Add the ec2-user to the docker group so you can execute Docker commands without using sudo. | |
[ec2-user ~]$ sudo usermod -a -G docker ec2-user | |
You should then be able to run all of the docker commands without requiring sudo. After running the 4th command I did need to logout and log back in for the change to take effect. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To get Docker running on the AWS AMI you should follow the steps below (these are all assuming you have ssh'd on to the EC2 instance).
Update the packages on your instance
[ec2-user ~]$
sudo yum update -y
Install Docker
[ec2-user ~]$
sudo yum install docker -y
Start the Docker Service
[ec2-user ~]$
sudo service docker start
Add the ec2-user to the docker group so you can execute Docker commands without using sudo.
[ec2-user ~]$
sudo usermod -a -G docker ec2-user
You should then be able to run all of the docker commands without requiring sudo. After running the 4th command I did need to logout and log back in for the change to take effect.