You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
If no `<dest>` file is specified, the output is sent to stdout. Mainly useful for debugging.
126
125
126
+
127
127
### Configuration file
128
128
129
129
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.
130
130
131
131
An example configuration file, **docker-gen.cfg** can be found in the examples folder.
132
132
133
133
#### Configuration File Syntax
134
-
134
+
```
135
135
***[[config]]***
136
136
Starts a configuration section
137
137
138
-
139
138
**dest = "path/to/a/file"**
140
139
path to a write the template. If not specfied, STDOUT is used
141
-
142
140
**notifycmd = "/etc/init.d/foo reload"**
143
141
run command after template is regenerated (e.g restart xyz)
144
-
145
142
**onlyexposed = true**
146
143
only include containers with exposed ports
147
144
**template = "/path/to/a/template/file.tmpl"**
148
145
path to a template to generate
149
-
150
146
**watch = true**
151
147
watch for container changes
152
148
@@ -155,13 +151,11 @@ An example configuration file, **docker-gen.cfg** can be found in the examples f
155
151
***[config.NotifyContainers]***
156
152
Starts a notify container section
157
153
158
-
159
154
**containername = 1**
160
155
container name followed by the signal to send
161
-
162
156
**container_id = 1**
163
157
or the container id can be used followed by the signal to send
164
-
158
+
```
165
159
Putting it all together here is an example configuration file.
0 commit comments