1buildah-config(1)           General Commands Manual          buildah-config(1)
2
3
4

NAME

6       buildah-config - Update image configuration settings.
7
8

SYNOPSIS

10       buildah config [options] container
11
12

DESCRIPTION

14       Updates one or more of the settings kept for a container.
15
16

OPTIONS

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 an 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 is named but neither  =  nor  a  value  is
117       specified,  then the value will be taken from the current process envi‐
118       ronment.  If env has a trailing -, then the env  is  removed  from  the
119       config.   If  the  env is set to "-" then all environment variables are
120       removed from the config.
121
122
123       --healthcheck command
124
125
126       Specify a command which should be run to check if a container  is  run‐
127       ning correctly.
128
129
130       Values  can be NONE, "CMD ..." (run the specified command directly), or
131       "CMD-SHELL ..." (run the specified command using the  system's  shell),
132       or  the  empty  value  (remove  a previously-set value and related set‐
133       tings).
134
135
136       Note: this setting is not present in the OCIv1 image format, so  it  is
137       discarded when writing images using OCIv1 formats.
138
139
140       --healthcheck-interval interval
141
142
143       Specify  how often the command specified using the --healthcheck option
144       should be run.
145
146
147       Note: this setting is not present in the OCIv1 image format, so  it  is
148       discarded when writing images using OCIv1 formats.
149
150
151       --healthcheck-retries count
152
153
154       Specify  how  many  times the command specified using the --healthcheck
155       option can fail before the container is considered to be unhealthy.
156
157
158       Note: this setting is not present in the OCIv1 image format, so  it  is
159       discarded when writing images using OCIv1 formats.
160
161
162       --healthcheck-start-period interval
163
164
165       Specify how much time can elapse after a container has started before a
166       failure to run the command specified  using  the  --healthcheck  option
167       should be treated as an indication that the container is failing.  Dur‐
168       ing this time period, failures will be attributed to the container  not
169       yet having fully started, and will not be counted as errors.  After the
170       command succeeds, or the time period  has  elapsed,  failures  will  be
171       counted as errors.
172
173
174       Note:  this  setting is not present in the OCIv1 image format, so it is
175       discarded when writing images using OCIv1 formats.
176
177
178       --healthcheck-timeout interval
179
180
181       Specify how long to wait after starting the command specified using the
182       --healthcheck option to wait for the command to return its exit status.
183       If the command has not returned within this time, it should be  consid‐
184       ered to have failed.
185
186
187       Note:  this  setting is not present in the OCIv1 image format, so it is
188       discarded when writing images using OCIv1 formats.
189
190
191       --history-comment comment
192
193
194       Sets a comment on the topmost layer in any images which will be created
195       using the specified container.
196
197
198       --hostname host
199
200
201       Set  the  hostname  to  set when running containers based on any images
202       built using the specified container.
203
204
205       Note: this setting is not present in the OCIv1 image format, so  it  is
206       discarded when writing images using OCIv1 formats.
207
208
209       --label, -l label=value
210
211
212       Add an image label (e.g. label=value) to the image configuration of any
213       images which will be built using the specified container. Can  be  used
214       multiple  times.   If label has a trailing -, then the label is removed
215       from the config.  If the label is set to "-" then all  labels  are  re‐
216       moved from the config.
217
218
219       --onbuild onbuild command
220
221
222       Add  an  ONBUILD  command to the image.  ONBUILD commands are automati‐
223       cally run when images are built based on the image you are creating.
224
225
226       Note: this setting is not present in the OCIv1 image format, so  it  is
227       discarded when writing images using OCIv1 formats.
228
229
230       --os operating system
231
232
233       Set  the target operating system for any images which will be built us‐
234       ing the specified container.  By default, if the container was based on
235       an image, its OS is kept, otherwise the host's OS's name is recorded.
236
237
238       --os-feature feature
239
240
241       Set  the  name  of  a  required operating system feature for any images
242       which will be built using the specified container.  By default, if  the
243       container  was  based on an image, the base image's required OS feature
244       list is kept, if it specified one.  This option is typically only mean‐
245       ingful when the image's OS is Windows.
246
247
248       If  feature  has a trailing -, then the feature is removed from the set
249       of required features which will be listed in the image.  If the feature
250       is set to "-" then the entire features list is removed from the config.
251
252
253       --os-version version
254
255
256       Set  the  exact  required operating system version for any images which
257       will be built using the specified container.  By default, if  the  con‐
258       tainer  was  based on an image, the base image's required OS version is
259       kept, if it specified one.  This option is  typically  only  meaningful
260       when  the  image's  OS is Windows, and is typically set in Windows base
261       images, so using this option is usually unnecessary.
262
263
264       --port, -p port
265
266
267       Add a port to expose when running containers based on any images  which
268       will  be  built  using  the  specified  container. Can be used multiple
269       times.  If port has a trailing -, and is already set, then the port  is
270       removed  from  the  config.  If the port is set to "-" then all exposed
271       ports settings are removed from the config.
272
273
274       --shell shell
275
276
277       Set the default shell to run inside of the container image.  The  shell
278       instruction  allows  the  default shell used for the shell form of com‐
279       mands to be overridden. The  default  shell  for  Linux  containers  is
280       "/bin/sh -c".
281
282
283       Note:  this  setting is not present in the OCIv1 image format, so it is
284       discarded when writing images using OCIv1 formats.
285
286
287       --stop-signal signal
288
289
290       Set default stop signal for container. This signal will  be  sent  when
291       container is stopped, default is SIGINT.
292
293
294       --user, -u user[:group]
295
296
297       Set  the  default user to be used when running containers based on this
298       image.  The user can be specified as a user  name  or  UID,  optionally
299       followed  by a group name or GID, separated by a colon (':').  If names
300       are used, the container should include entries for those names  in  its
301       /etc/passwd and /etc/group files.
302
303
304       --variant variant
305
306
307       Set  the target architecture variant for any images which will be built
308       using the specified container.  By default, if the container was  based
309       on  an  image, that image's target architecture and variant information
310       is kept, otherwise the host's architecture and variant are recorded.
311
312
313       --volume, -v volume
314
315
316       Add a location in the directory tree which should be marked as a volume
317       in any images which will be built using the specified container. Can be
318       used multiple times. If volume has a trailing -, and  is  already  set,
319       then  the  volume  is removed from the config.  If the volume is set to
320       "-" then all volumes are removed from the config.
321
322
323       --workingdir directory
324
325
326       Set the initial working directory for containers based on images  which
327       will be built using the specified container.
328
329

EXAMPLE

331       buildah  config --author='Jane Austen' --workingdir='/etc/mycontainers'
332       containerID
333
334
335       buildah config --entrypoint /entrypoint.sh containerID
336
337
338       buildah config --entrypoint '[ "/entrypoint.sh", "dev" ]' containerID
339
340
341       buildah config --env foo=bar --env PATH=$PATH containerID
342
343
344       buildah config --env foo- containerID
345
346
347       buildah  config  --label  Name=Mycontainer  --label   Version=1.0  con‐
348       tainerID
349
350
351       buildah config --label Name- containerID
352
353
354       buildah config --annotation note=myNote containerID
355
356
357       buildah config --annotation note-
358
359
360       buildah config --volume /usr/myvol containerID
361
362
363       buildah config --volume /usr/myvol- containerID
364
365
366       buildah config --port 1234 --port 8080 containerID
367
368
369       buildah config --env 1234=5678 containerID
370
371
372       buildah config --env 1234- containerID
373
374
375       buildah config --os-version 10.0.19042.1645 containerID
376
377
378       buildah config --os-feature win32k containerID
379
380
381       buildah config --os-feature win32k- containerID
382
383

SEE ALSO

385       buildah(1)
386
387
388
389buildah                           March 2017                 buildah-config(1)
Impressum