Skip to content

Commit 4d03261

Browse files
committed
Updating formating on docs.
1 parent d4f4c9c commit 4d03261

File tree

1 file changed

+38
-44
lines changed

1 file changed

+38
-44
lines changed

README.md

Lines changed: 38 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -77,76 +77,72 @@ $ docker run -d --name nginx-gen --volumes-from nginx \
7777
### Usage
7878
```
7979
$ docker-gen
80-
```
81-
**Usage: docker-gen [options] template [dest]**
80+
Usage: docker-gen [options] template [dest]
8281
8382
Generate files from docker container meta-data
8483
8584
Options:
86-
   -config value
87-
       config files with template directives. Config files will be merged if this option is specified multiple times. (default [])
88-
   -endpoint string
89-
       docker api endpoint (tcp|unix://..). Default unix:///var/run/docker.sock
90-
   -interval int
91-
       notify command interval (secs)
92-
   -keep-blank-lines
93-
       keep blank lines in the output file
94-
   -notify restart xyz
95-
       run command after template is regenerated (e.g restart xyz)
96-
   -notify-sighup docker kill -s HUP container-ID
97-
       send HUP signal to container. Equivalent to docker kill -s HUP container-ID
98-
   -only-exposed
99-
       only include containers with exposed ports
100-
   -only-published
101-
       only include containers with published ports (implies -only-exposed)
102-
   -tlscacert string
103-
       path to TLS CA certificate file (default "/Users/jason/.docker/machine/machines/default/ca.pem")
104-
   -tlscert string
105-
       path to TLS client certificate file (default "/Users/jason/.docker/machine/machines/default/cert.pem")
106-
   -tlskey string
107-
       path to TLS client key file (default "/Users/jason/.docker/machine/machines/default/key.pem")
108-
   -tlsverify
109-
       verify docker daemon's TLS certicate (default true)
110-
   -version
111-
       show version
112-
   -watch
113-
       watch for container changes
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
114113
115114
Arguments:
116-
   template - path to a template to generate
117-
   dest - path to a write the template. If not specfied, STDOUT is used
115+
template - path to a template to generate
116+
dest - path to a write the template. If not specfied, STDOUT is used
118117
119118
Environment Variables:
120-
   DOCKER_HOST - default value for -endpoint
121-
   DOCKER_CERT_PATH - directory path containing key.pem, cert.pm and ca.pem
122-
   DOCKER_TLS_VERIFY - enable client TLS verification]
123-
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]
122+
```
124123

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

126+
127127
### Configuration file
128128

129129
Using the -config flag from above you can tell docker-gen to use the specified config file instead of command-line options. Multiple templates can be defined and they will be executed in the order that they appear in the config file.
130130

131131
An example configuration file, **docker-gen.cfg** can be found in the examples folder.
132132

133133
#### Configuration File Syntax
134-
134+
```
135135
***[[config]]***
136136
&nbsp;&nbsp;&nbsp;&nbsp;Starts a configuration section
137137
138-
139138
**dest = "path/to/a/file"**
140139
&nbsp;&nbsp;&nbsp;&nbsp;path to a write the template. If not specfied, STDOUT is used
141-
142140
**notifycmd = "/etc/init.d/foo reload"**
143141
&nbsp;&nbsp;&nbsp;&nbsp;run command after template is regenerated (e.g restart xyz)
144-
145142
**onlyexposed = true**
146143
&nbsp;&nbsp;&nbsp;&nbsp;only include containers with exposed ports
147144
**template = "/path/to/a/template/file.tmpl"**
148145
&nbsp;&nbsp;&nbsp;&nbsp;path to a template to generate
149-
150146
**watch = true**
151147
&nbsp;&nbsp;&nbsp;&nbsp;watch for container changes
152148
@@ -155,13 +151,11 @@ An example configuration file, **docker-gen.cfg** can be found in the examples f
155151
***[config.NotifyContainers]***
156152
&nbsp;&nbsp;&nbsp;&nbsp;Starts a notify container section
157153
158-
159154
**containername = 1**
160155
&nbsp;&nbsp;&nbsp;&nbsp;container name followed by the signal to send
161-
162156
**container_id = 1**
163157
&nbsp;&nbsp;&nbsp;&nbsp;or the container id can be used followed by the signal to send
164-
158+
```
165159
Putting it all together here is an example configuration file.
166160
```
167161
[[config]]

0 commit comments

Comments
 (0)