Last active
July 14, 2017 03:38
-
-
Save mattc41190/da0db9d4194cf896435156ac7c68e540 to your computer and use it in GitHub Desktop.
Start simple server on linux with or without initial docker installation
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
# 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