Skip to content

Commit a3a861f

Browse files
committed
Update usage docs
1 parent d97a78b commit a3a861f

File tree

1 file changed

+42
-23
lines changed

1 file changed

+42
-23
lines changed

README.md

+42-23
Original file line numberDiff line numberDiff line change
@@ -77,29 +77,48 @@ $ docker run -d --name nginx-gen --volumes-from nginx \
7777
### Usage
7878
```
7979
$ docker-gen
80-
Usage: docker-gen [-config file] [-watch=false] [-notify="restart xyz"] [-notify-sighup="nginx-proxy"] [-interval=0] [-endpoint tcp|unix://..] [-tlsverify] [-tlscert file] [-tlskey file] [-tlscacert file] [-keep-blank-lines] <template> [<dest>]
81-
```
82-
83-
*Options:*
84-
85-
```
86-
-config="": Use the specified config file instead of command-line options. Multiple templates can be defined and
87-
they will be executed in the order that they appear in the config file.
88-
-endpoint="": docker api endpoint [tcp|unix://..]. This can also be set w/ a `DOCKER_HOST` environment.
89-
-interval=0:run notify command interval (s). Useful for service registration use cases.
90-
-notify="": run command after template is regenerated ["restart xyz"]. Useful for restarting nginx,
91-
reloading haproxy, etc..
92-
-notify-sighup="": send HUP signal to container. Equivalent to `docker kill -s HUP container-ID`
93-
-only-exposed=false: only include containers with exposed ports
94-
-only-published=false: only include containers with published ports (implies -only-exposed)
95-
-keep-blank-lines=false: keep blank lines in the output file
96-
-tlscacert="": path to TLS CA certificate file
97-
-tlscert="": path to TLS client certificate file
98-
-tlskey="": path to TLS client key file
99-
-tlsverify=false: verify docker daemon's TLS certicate
100-
-version=false: show version
101-
-watch=false: run continuously and monitors docker container events. When containers are started
102-
or stopped, the template is regenerated.
80+
Usage: docker-gen [options] template [dest]
81+
82+
Generate files from docker container meta-data
83+
84+
Options:
85+
-config value
86+
config files with template directives. Config files will be merged if this option is specified multiple times. (default [])
87+
-endpoint string
88+
docker api endpoint (tcp|unix://..). Default unix:///var/run/docker.sock
89+
-interval int
90+
notify command interval (secs)
91+
-keep-blank-lines
92+
keep blank lines in the output file
93+
-notify restart xyz
94+
run command after template is regenerated (e.g restart xyz)
95+
-notify-sighup docker kill -s HUP container-ID
96+
send HUP signal to container. Equivalent to docker kill -s HUP container-ID
97+
-only-exposed
98+
only include containers with exposed ports
99+
-only-published
100+
only include containers with published ports (implies -only-exposed)
101+
-tlscacert string
102+
path to TLS CA certificate file (default "/Users/jason/.docker/machine/machines/default/ca.pem")
103+
-tlscert string
104+
path to TLS client certificate file (default "/Users/jason/.docker/machine/machines/default/cert.pem")
105+
-tlskey string
106+
path to TLS client key file (default "/Users/jason/.docker/machine/machines/default/key.pem")
107+
-tlsverify
108+
verify docker daemon's TLS certicate (default true)
109+
-version
110+
show version
111+
-watch
112+
watch for container changes
113+
114+
Arguments:
115+
template - path to a template to generate
116+
dest - path to a write the template. If not specfied, STDOUT is used
117+
118+
Environment Variables:
119+
DOCKER_HOST - default value for -endpoint
120+
DOCKER_CERT_PATH - directory path containing key.pem, cert.pm and ca.pem
121+
DOCKER_TLS_VERIFY - enable client TLS verification]
103122
```
104123

105124
If no `<dest>` file is specified, the output is sent to stdout. Mainly useful for debugging.

0 commit comments

Comments
 (0)