Easily check logs outside of the container

This commit is contained in:
odino 2014-08-23 17:55:27 +04:00
parent 34afde73e0
commit e79abfdbaa
2 changed files with 5 additions and 0 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
*.log

View file

@ -14,6 +14,10 @@ Then start any containers you want proxied with an env var VIRTUAL_HOST=subdomai
Provided your DNS is setup to forward foo.bar.com to the a host running nginx-proxy, the request will be routed to a container with the VIRTUAL_HOST env var set.
If you want to get the nginx logs in your current working directory, simply:
$ docker run -d -p 80:80 -v /var/run/docker.sock:/tmp/docker.sock -v $(pwd):/var/log/nginx -t jwilder/nginx-proxy
### Multiple Ports
If your container exposes multiple ports, nginx-proxy will default to the service running on port 80. If you need to specify a different port, you can set a VIRTUAL_PORT env var to select a different one. If your container only exposes one port and it has a VIRTUAL_HOST env var set, that port will be selected.