Nginx Reverse Proxy Dockerfile
This repository contains Dockerfile of Nginx for Docker’s automated build published to the public Docker Hub Registry.
Base Docker Image
Installation
-
Install Docker.
-
Download automated build from public Docker Hub Registry:
docker pull hoycdanny/nginx-reverse-proxy
- You can build an image from Dockerfile:
git clone https://github.com/hoycdanny/Dockerfile cd Dockerfile/nginx-reverse-proxy docker build -t /hoycdanny/nginx-reverse-proxy . - You can edit container boot run shell-script
docker-entrypoint.sh.
Usage
docker run -tdi \
-e PROXY_PASS=https://www.nginx.com \
-e PROXY_PATH=nginx \
-p 80:80 \
nginx-reverse-proxy
Attach persistent/shared directories.
docker run -tdi \
-e PROXY_PASS=PASS_URL \
-e PROXY_PATH=PASS_PATH \
-p 80:80 \
nginx-reverse-proxy
After few seconds open you browser.
curl http://localhost #nginx welcom page
curl http://localhost/PASS_PATH #PASS_URL