Skip to content

Latest commit

 

History

History

nginx

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

build base image

docker build -t nginx_proxy_base:latest -f docker/Dockerfile-base .

build app image

docker build -t nginx_proxy_app:latest -f docker/Dockerfile .

run for test

docker run -it --rm -p 80:80 nginx_proxy_app:latest

common sense

  • nginx -g daemon off;" or CMD ["nginx", "-g", "daemon off;"] in Dockerfile
nginx run as daemon by default. But in docker, the container must have foreground process to keep running.
So use the `daemon off;` to set the nginx process foreground.