Skip to content

Instantly share code, notes, and snippets.

@jg75
Created February 27, 2019 17:00
Show Gist options
  • Save jg75/7547e0aa580c2562c4c55561fae7730c to your computer and use it in GitHub Desktop.
Save jg75/7547e0aa580c2562c4c55561fae7730c to your computer and use it in GitHub Desktop.
How to install docker on an EC2 instance
# Needs to run as root
yum update -y
amazon-linux-extras install docker
systemctl enable docker
usermod -a -G docker ec2-user
# The above can go into user-data,
# but you'll still need to reboot because of the group add
reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment