Skip to content

Commit 9920785

Browse files
committed
Explicitly make docker socket rw in documentation
Docker does not allow for read-only mounts of sockets at this point. This can be tested by running: ❯ docker run --rm -it -v /var/run/docker.sock:/tmp/docker.sock:ro \ docker ls -l /tmp/docker.sock srw-rw---- 1 root 967 0 Apr 13 16:16 /tmp/docker.sock ❯ docker run --rm -it -v /var/run/docker.sock:/tmp/docker.sock:ro \ docker /usr/local/bin/docker -H unix:///tmp/docker.sock ps |wc -l 17 Even if docker supported read-only sockets, you would not want it to be read-only if you are using `-notify-sighup` because then the docker socket is used to communicate to the other container to notify it. This change in documentation reflects the fact that the socket will be writable.
1 parent 2024a2f commit 9920785

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Fetch the template and start the docker-gen container with the shared volume:
6868
$ mkdir -p /tmp/templates && cd /tmp/templates
6969
$ curl -o nginx.tmpl https://raw.githubusercontent.com/jwilder/docker-gen/master/templates/nginx.tmpl
7070
$ docker run -d --name nginx-gen --volumes-from nginx \
71-
-v /var/run/docker.sock:/tmp/docker.sock:ro \
71+
-v /var/run/docker.sock:/tmp/docker.sock:rw \
7272
-v /tmp/templates:/etc/docker-gen/templates \
7373
-t jwilder/docker-gen -notify-sighup nginx -watch -only-exposed /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf
7474
```

0 commit comments

Comments
 (0)