Skip to content

tjcchen/nginx-html

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nginx-html

Static website bootstrapped with Docker nginx.

Commands

# pull latest nginx image
docker pull nginx:latest

# bootstrap a nginx server with docker( http://localhost:8000/ )
docker run -it -p 8000:80 nginx

# display & remove exited container
docker ps -a
docker rm 0116feb446c9

# run docker nginx in background
docker run -d -p 8000:80 -v /Users/chen/nginx-html:/usr/share/nginx/html --name my-nginx nginx

# -d purpose: run a Container that is detached in the background.

# -p purpose: host port to bind a Container port.

# -v purpose: volume to bind and mount from the host OS into the Accesser Container persistent area. The host directory must be writeable, the directory cannot be shared between Container instances and the directory must be unique.

# static html page is available now
Index: http://localhost:8000/
About: http://localhost:8000/about.html

# stop your docker container
By name: docker stop my-nginx
By containerid: docker stop e71175fcf96d

License

MIT

About

Static website bootstrapped with Docker nginx

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages