Skip to content

Commit ee373a4

Browse files
committed
Merge pull request #35 from tehbilly/patch-1
Updating example to work with Docker hub
2 parents d8ae5c0 + b7f1a31 commit ee373a4

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff 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
===

0 commit comments

Comments
 (0)