This repository contains Dockerfile of nginx-proxy for docker's automated build
published to the public docker hub registry.
Proxy a specific port to both your webserver and websocket server with Nginx inside a Docker container.
Install docker.
Download automated build from public docker hub registry:
docker pull foliea/nginx-proxy
docker run -e WEB_URL="http://<docker host ip>:3000" \
-e WS_URL="http://<docker host ip>:8080" \
-d -p 80:80 foliea/nginx-proxy
You can also mount a volume with ssl certficates and use ssl:
docker run -e WEB_URL="http://<docker host ip>:3000" \
-e WS_URL="http://<docker host ip>:8080" \
-e SSL=1 \
-v <your certs directory>:/certs \
-d -p 80:80 -p 443:443 foliea/nginx-proxy
The path your are mounting must have both
cert.pemandkey.pemcertificate files inside.
You can also use Docker links instead of setting manually WEB_URL and
WS_URL:
docker run --link="container1:web" \
--link="container2:ws" \
-d -p 80:80 foliea/nginx-proxy
You must link to containers with at least one port exposed.
You can customize this container with environment variables:
WORKERS: Worker connections (default: 1024).SERVER_NAME: Server domain name (e.g. beta.42grounds.io).PORT: Port to serve (default: 80).WS_ROUTE: Websocket route to proxy (default: socket.io).SSL: Use SSL (defaults: 0).SSL_PORT: Port to serve for SSL (default: 443).If you are not using Docker links:
WEB_URL: Webserver url to proxy (must be specified).WS_URL: Websocket server to proxy (must be specified).Content type
Image
Digest
sha256:a0f3795c9…
Size
52.6 MB
Last updated
almost 11 years ago
docker pull foliea/nginx-proxy