./nginx
is mounted to/etc/nginx
and it contains the full configuration as it comes from NGINX./data
is mount to/data
# run the nginx
make
# see the logs
make logs
# open console
make shell
See ./Makefile
for more options.
# build
docker build --no-cache -t nginxplus .
# start
docker run --name mynginxplus -p 80:80 -d nginxplus
# Example
docker run --name mynginx2 --mount type=bind,source=/var/www,target=/usr/share/nginx/html,readonly --mount source=/var/nginx/conf,target=/etc/nginx/conf,readonly -p 80:80 -d nginx