Skip to content

Instantly share code, notes, and snippets.

@mattc41190
Created July 14, 2017 01:53
Show Gist options
  • Save mattc41190/e71f9b570b99c3704f70ca4ca6b53d45 to your computer and use it in GitHub Desktop.
Save mattc41190/e71f9b570b99c3704f70ca4ca6b53d45 to your computer and use it in GitHub Desktop.
Shell script to run simple server docker image
# Tell docker to build an image called/tagged as mattc41190/tomdog and to use the durrent dir and context for the Dockerfile
docker build -t mattc41190/tomdog .
# Tell docker to run a container (in detatched made `d`) based on the tomdog
# image and to expose port 80 on the container to the host machine
docker run -e "PORT=80" -p 80:80 -d mattc41190/tomdog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment