File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -58,12 +58,14 @@ Start nginx with a shared volume:
5858$ docker run -d -p 80:80 --name nginx -v /tmp/nginx:/etc/nginx/conf.d -t nginx
5959```
6060
61- Start the docker-gen container with the shared volume:
62- ```
63- $ docker run --volumes-from nginx \
64- -v /var/run/docker.sock:/tmp/docker.sock \
65- -v $(pwd)/templates:/etc/docker-gen/templates
66- -t docker-gen -notify-sighup nginx -watch --only-published /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf
61+ Fetch the template and start the docker-gen container with the shared volume:
62+ ```
63+ $ mkdir -p /tmp/templates && cd /tmp/templates
64+ $ curl -o nginx.tmpl https://raw.githubusercontent.com/jwilder/docker-gen/master/templates/nginx.tmpl
65+ $ docker run -d --name nginx-gen --volumes-from nginx \
66+ -v /var/run/docker.sock:/tmp/docker.sock \
67+ -v /tmp/templates:/etc/docker-gen/templates \
68+ -t jwilder/docker-gen:0.3.4 -notify-sighup nginx -watch --only-published /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf
6769```
6870
6971===
You can’t perform that action at this time.
0 commit comments