Skip to content

Commit b7f1a31

Browse files
committed
Updating example to work with Docker hub
Previous version didn't include proper name to pull from remote. Updated example to lower potential frustration for new users.
1 parent d8ae5c0 commit b7f1a31

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)