Created
July 14, 2017 01:53
-
-
Save mattc41190/e71f9b570b99c3704f70ca4ca6b53d45 to your computer and use it in GitHub Desktop.
Shell script to run simple server docker image
This file contains hidden or 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
# 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