Set the environment variable in the image itself

This commit is contained in:
thismatters 2020-09-17 07:55:02 -05:00
parent 3e62a9247f
commit 0c15f4ee0e
2 changed files with 2 additions and 4 deletions

View file

@ -30,7 +30,7 @@ COPY . /app/
WORKDIR /app/
ENV DOCKER_HOST unix:///tmp/docker.sock
ENV NGINX_PROXY_CONTAINER true
VOLUME ["/etc/nginx/certs", "/etc/nginx/dhparam"]
ENTRYPOINT ["/app/docker-entrypoint.sh"]

View file

@ -10,7 +10,7 @@ See [Automated Nginx Reverse Proxy for Docker][2] for why you might want to use
To run it:
$ docker run -d -p 80:80 -v /var/run/docker.sock:/tmp/docker.sock:ro -e NGINX_PROXY_CONTAINER=true jwilder/nginx-proxy
$ docker run -d -p 80:80 -v /var/run/docker.sock:/tmp/docker.sock:ro jwilder/nginx-proxy
Then start any containers you want proxied with an env var `VIRTUAL_HOST=subdomain.youdomain.com`
@ -48,8 +48,6 @@ services:
- "80:80"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
environment:
- NGINX_PROXY_CONTAINER=true
whoami:
image: jwilder/whoami