Skip to content

Instantly share code, notes, and snippets.

@timlesallen
Last active August 29, 2015 14:13
Show Gist options
  • Save timlesallen/0c4934ca0644b12e1e69 to your computer and use it in GitHub Desktop.
Save timlesallen/0c4934ca0644b12e1e69 to your computer and use it in GitHub Desktop.
Provisioning a docker container (port 80) on ec2 (WIP)
# First, create an ec2 instance and log in to it.
curl -sSL https://get.docker.com/ubuntu/ | sudo sh # (sets up docker on the box)
git pull <git repo> # get your repo
cd <git repo> && sudo docker build -t <image-tag> . #build your image
sudo docker run -d -p 80:80 --restart=always <image-tag> # start it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment