Created
September 2, 2017 07:18
-
-
Save u1i/b7907f936956079088b97d3549af729c to your computer and use it in GitHub Desktop.
Simple nginx docker container with static content
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
mkdir www | |
echo "Hello World" > www/index.html | |
# create a file called Dockerfile | |
' | |
FROM nginx | |
COPY www /usr/share/nginx/html | |
' | |
docker build -t my-nginx . | |
$ docker run -d -p 80:80 my-nginx |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment