1buildah-config(1) General Commands Manual buildah-config(1)
2
3
4
6 buildah-config - Update image configuration settings.
7
8
10 buildah config [options] container
11
12
14 Updates one or more of the settings kept for a container.
15
16
18 --add-history
19
20
21 Add an entry to the image's history which will note changes to the set‐
22 tings for --cmd, --entrypoint, --env, --healthcheck, --label, --on‐
23 build, --port, --shell, --stop-signal, --user, --volume, and --work‐
24 ingdir. Defaults to false.
25
26
27 Note: You can also override the default value of --add-history by set‐
28 ting the BUILDAH_HISTORY environment variable. export BUILDAH_HIS‐
29 TORY=true
30
31
32 --annotation, -a annotation=annotation
33
34
35 Add an image annotation (e.g. annotation=annotation) to the image mani‐
36 fest of any images which will be built using the specified container.
37 Can be used multiple times. If annotation has a trailing -, then the
38 annotation is removed from the config. If the annotation is set to "-"
39 then all annotations are removed from the config.
40
41
42 --arch architecture
43
44
45 Set the target architecture for any images which will be built using
46 the specified container. By default, if the container was based on an
47 image, that image's target architecture is kept, otherwise the host's
48 architecture is recorded.
49
50
51 --author author
52
53
54 Set contact information for the author for any images which will be
55 built using the specified container.
56
57
58 --cmd command
59
60
61 Set the default command to run for containers based on any images which
62 will be built using the specified container. When used in combination
63 with an entry point, this specifies the default parameters for the en‐
64 try point.
65
66
67 --comment comment
68
69
70 Set the image-level comment for any images which will be built using
71 the specified container.
72
73
74 Note: this setting is not present in the OCIv1 image format, so it is
75 discarded when writing images using OCIv1 formats.
76
77
78 --created-by created
79
80
81 Set the description of how the topmost layer was created for any images
82 which will be created using the specified container.
83
84
85 --domainname domain
86
87
88 Set the domainname to set when running containers based on any images
89 built using the specified container.
90
91
92 Note: this setting is not present in the OCIv1 image format, so it is
93 discarded when writing images using OCIv1 formats.
94
95
96 --entrypoint "command" | '["command", "arg1", ...]'
97
98
99 Set the entry point for containers based on any images which will be
100 built using the specified container. buildah supports two formats for
101 entrypoint. It can be specified as a simple string, or as a array of
102 commands.
103
104
105 Note: When the entrypoint is specified as a string, container runtimes
106 will ignore the cmd value of the container image. However if you use
107 the array form, then the cmd will be appended onto the end of the en‐
108 trypoint cmd and be executed together.
109
110
111 --env, -e env=value
112
113
114 Add a value (e.g. env=value) to the environment for containers based on
115 any images which will be built using the specified container. Can be
116 used multiple times. If env has a trailing -, then the env is removed
117 from the config. If the env is set to "-" then all environment vari‐
118 ables are removed from the config.
119
120
121 --healthcheck command
122
123
124 Specify a command which should be run to check if a container is run‐
125 ning correctly.
126
127
128 Values can be NONE, "CMD ..." (run the specified command directly), or
129 "CMD-SHELL ..." (run the specified command using the system's shell),
130 or the empty value (remove a previously-set value and related set‐
131 tings).
132
133
134 Note: this setting is not present in the OCIv1 image format, so it is
135 discarded when writing images using OCIv1 formats.
136
137
138 --healthcheck-interval interval
139
140
141 Specify how often the command specified using the --healthcheck option
142 should be run.
143
144
145 Note: this setting is not present in the OCIv1 image format, so it is
146 discarded when writing images using OCIv1 formats.
147
148
149 --healthcheck-retries count
150
151
152 Specify how many times the command specified using the --healthcheck
153 option can fail before the container is considered to be unhealthy.
154
155
156 Note: this setting is not present in the OCIv1 image format, so it is
157 discarded when writing images using OCIv1 formats.
158
159
160 --healthcheck-start-period interval
161
162
163 Specify how much time can elapse after a container has started before a
164 failure to run the command specified using the --healthcheck option
165 should be treated as an indication that the container is failing. Dur‐
166 ing this time period, failures will be attributed to the container not
167 yet having fully started, and will not be counted as errors. After the
168 command succeeds, or the time period has elapsed, failures will be
169 counted as errors.
170
171
172 Note: this setting is not present in the OCIv1 image format, so it is
173 discarded when writing images using OCIv1 formats.
174
175
176 --healthcheck-timeout interval
177
178
179 Specify how long to wait after starting the command specified using the
180 --healthcheck option to wait for the command to return its exit status.
181 If the command has not returned within this time, it should be consid‐
182 ered to have failed.
183
184
185 Note: this setting is not present in the OCIv1 image format, so it is
186 discarded when writing images using OCIv1 formats.
187
188
189 --history-comment comment
190
191
192 Sets a comment on the topmost layer in any images which will be created
193 using the specified container.
194
195
196 --hostname host
197
198
199 Set the hostname to set when running containers based on any images
200 built using the specified container.
201
202
203 Note: this setting is not present in the OCIv1 image format, so it is
204 discarded when writing images using OCIv1 formats.
205
206
207 --label, -l label=value
208
209
210 Add an image label (e.g. label=value) to the image configuration of any
211 images which will be built using the specified container. Can be used
212 multiple times. If label has a trailing -, then the label is removed
213 from the config. If the label is set to "-" then all labels are re‐
214 moved from the config.
215
216
217 --onbuild onbuild command
218
219
220 Add an ONBUILD command to the image. ONBUILD commands are automati‐
221 cally run when images are built based on the image you are creating.
222
223
224 Note: this setting is not present in the OCIv1 image format, so it is
225 discarded when writing images using OCIv1 formats.
226
227
228 --os operating system
229
230
231 Set the target operating system for any images which will be built us‐
232 ing the specified container. By default, if the container was based on
233 an image, its OS is kept, otherwise the host's OS's name is recorded.
234
235
236 --port, -p port
237
238
239 Add a port to expose when running containers based on any images which
240 will be built using the specified container. Can be used multiple
241 times. If port has a trailing -, and is already set, then the port is
242 removed from the config. If the port is set to "-" then all exposed
243 ports settings are removed from the config.
244
245
246 --shell shell
247
248
249 Set the default shell to run inside of the container image. The shell
250 instruction allows the default shell used for the shell form of com‐
251 mands to be overridden. The default shell for Linux containers is
252 "/bin/sh -c".
253
254
255 Note: this setting is not present in the OCIv1 image format, so it is
256 discarded when writing images using OCIv1 formats.
257
258
259 --stop-signal signal
260
261
262 Set default stop signal for container. This signal will be sent when
263 container is stopped, default is SIGINT.
264
265
266 --user, -u user[:group]
267
268
269 Set the default user to be used when running containers based on this
270 image. The user can be specified as a user name or UID, optionally
271 followed by a group name or GID, separated by a colon (':'). If names
272 are used, the container should include entries for those names in its
273 /etc/passwd and /etc/group files.
274
275
276 --volume, -v volume
277
278
279 Add a location in the directory tree which should be marked as a volume
280 in any images which will be built using the specified container. Can be
281 used multiple times. If volume has a trailing -, and is already set,
282 then the volume is removed from the config. If the volume is set to
283 "-" then all volumes are removed from the config.
284
285
286 --workingdir directory
287
288
289 Set the initial working directory for containers based on images which
290 will be built using the specified container.
291
292
294 buildah config --author='Jane Austen' --workingdir='/etc/mycontainers'
295 containerID
296
297
298 buildah config --entrypoint /entrypoint.sh containerID
299
300
301 buildah config --entrypoint '[ "/entrypoint.sh", "dev" ]' containerID
302
303
304 buildah config --env foo=bar --env PATH=$PATH containerID
305
306
307 buildah config --env foo- containerID
308
309
310 buildah config --label Name=Mycontainer --label Version=1.0 con‐
311 tainerID
312
313
314 buildah config --label Name- containerID
315
316
317 buildah config --annotation note=myNote containerID
318
319
320 buildah config --annotation note-
321
322
323 buildah config --volume /usr/myvol containerID
324
325
326 buildah config --volume /usr/myvol- containerID
327
328
329 buildah config --port 1234 --port 8080 containerID
330
331
332 buildah config --env 1234- containerID
333
334
336 buildah(1)
337
338
339
340buildah March 2017 buildah-config(1)