Skip to content

Instantly share code, notes, and snippets.

@brijesh-deb
Last active June 19, 2018 10:21
Show Gist options
  • Save brijesh-deb/c223c7d8e7d14e83d96001e87330642a to your computer and use it in GitHub Desktop.
Save brijesh-deb/c223c7d8e7d14e83d96001e87330642a to your computer and use it in GitHub Desktop.
#docker #installation

Docker on AWS EC2 instance

  • Create a new ec2 instance with Amazon Linux AMI
  • Access the instance using Putty
  • sudo su [change to root user]
  • Install docker
    • yum update -y
    • yum install -y docker [Install docker]
    • docker -v [Check Docker version]
    • service docker start [Start Docker engine]
    • docker images
    • docker pull alpine
  • Initialize swarm
    • docker swarm init --advertise-addr [ec2 instance private ip]:2377 --listen-addr [ec2 instance private ip]:2377
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment