Simple nginx ssl proxy docker image that contain "nginx-module-njs" package (in order to import nginx modules) mainly use to protect http request using ssl certificate (https).
🐳 Image is build anb pushed to dockerhub at nginx_proxy
- None
start the a container following nginx docker image documentation. See below an example of nginx container start :
docker run --name some-nginx -d -p 8080:80 some-content-nginx
See below an example of docker-compose usage for this image :
jenkins_proxy:
image: tinycompany/nginx:latest
container_name: jenkins_proxy
networks:
- jenkins_network
volumes:
- /srv/nginx/conf.d:/etc/nginx/conf.d
- /srv/nginx/nginx.conf:/etc/nginx/nginx.conf
ports:
- 80:80
- 443:443
depends_on:
- jenkins_web
-
to use specific/advanced configuration (configure through nginx.conf), you can use nginx configuration ansible's role.
-
or simply mount your custom nginx.conf file as a volume :
$ docker run --name my-custom-nginx-container -v /host/path/nginx.conf:/etc/nginx/nginx.conf:ro -d nginx
See more at nginx docker image documentation "customize configuration" part