Skip to content

Instantly share code, notes, and snippets.

@mattc41190
Last active July 14, 2017 03:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattc41190/da0db9d4194cf896435156ac7c68e540 to your computer and use it in GitHub Desktop.
Save mattc41190/da0db9d4194cf896435156ac7c68e540 to your computer and use it in GitHub Desktop.
Start simple server on linux with or without initial docker installation
# Update EC2 Linux package manager
sudo yum update -y
# Use package manager to install docker
sudo yum install -y docker
# Use Linux service to start docker service
sudo service docker start
# Ensure ec2-user has rights to perform docker commands
sudo usermod -a -G docker ec2-user
# Pull image
sudo docker pull mattc41190/tomdog
# Start image on port 80
sudo docker run -p 80:80 --rm -e "PORT=80" -d mattc41190/tomdog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment