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,
23       --onbuild,   --port,  --shell,  --stop-signal,  --user,  --volume,  and
24       --workingdir.  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 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.
39
40
41       --arch architecture
42
43
44       Set  the  target  architecture for any images which will be built using
45       the specified container.  By default, if the container was based on  an
46       image,  that  image's target architecture is kept, otherwise the host's
47       architecture is recorded.
48
49
50       --author author
51
52
53       Set contact information for the author for any  images  which  will  be
54       built using the specified container.
55
56
57       --cmd command
58
59
60       Set the default command to run for containers based on any images which
61       will be built using the specified container.  When used in  combination
62       with  an  entry  point,  this  specifies the default parameters for the
63       entry point.
64
65
66       --comment comment
67
68
69       Set the image-level comment for any images which will  be  built  using
70       the specified container.
71
72
73       Note:  this  setting is not present in the OCIv1 image format, so it is
74       discarded when writing images using OCIv1 formats.
75
76
77       --created-by created
78
79
80       Set the description of how the topmost layer was created for any images
81       which will be created using the specified container.
82
83
84       --domainname domain
85
86
87       Set  the  domainname to set when running containers based on any images
88       built using the specified container.
89
90
91       Note: this setting is not present in the OCIv1 image format, so  it  is
92       discarded when writing images using OCIv1 formats.
93
94
95       --entrypoint "command" | '["command", "arg1", ...]'
96
97
98       Set  the  entry  point for containers based on any images which will be
99       built using the specified container. buildah supports two  formats  for
100       entrypoint.   It  can be specified as a simple string, or as a array of
101       commands.
102
103
104       Note: When the entrypoint is specified as a string, container  runtimes
105       will  ignore  the cmd value of the container image.  However if you use
106       the array form, then the cmd will be  appended  onto  the  end  of  the
107       entrypoint cmd and be executed together.
108
109
110       --env env=value
111
112
113       Add a value (e.g. env=value) to the environment for containers based on
114       any images which will be built using the specified  container.  Can  be
115       used  multiple times.  If env has a trailing -, then the env is removed
116       from the config.
117
118
119       --healthcheck command
120
121
122       Specify a command which should be run to check if a container  is  run‐
123       ning correctly.
124
125
126       Values  can be NONE, "CMD ..." (run the specified command directly), or
127       "CMD-SHELL ..." (run the specified command using the  system's  shell),
128       or  the  empty  value  (remove  a previously-set value and related set‐
129       tings).
130
131
132       Note: this setting is not present in the OCIv1 image format, so  it  is
133       discarded when writing images using OCIv1 formats.
134
135
136       --healthcheck-interval interval
137
138
139       Specify  how often the command specified using the --healthcheck option
140       should be run.
141
142
143       Note: this setting is not present in the OCIv1 image format, so  it  is
144       discarded when writing images using OCIv1 formats.
145
146
147       --healthcheck-retries count
148
149
150       Specify  how  many  times the command specified using the --healthcheck
151       option can fail before the container is considered to be unhealthy.
152
153
154       Note: this setting is not present in the OCIv1 image format, so  it  is
155       discarded when writing images using OCIv1 formats.
156
157
158       --healthcheck-start-period interval
159
160
161       Specify how much time can elapse after a container has started before a
162       failure to run the command specified  using  the  --healthcheck  option
163       should be treated as an indication that the container is failing.  Dur‐
164       ing this time period, failures will be attributed to the container  not
165       yet having fully started, and will not be counted as errors.  After the
166       command succeeds, or the time period  has  elapsed,  failures  will  be
167       counted as errors.
168
169
170       Note:  this  setting is not present in the OCIv1 image format, so it is
171       discarded when writing images using OCIv1 formats.
172
173
174       --healthcheck-timeout interval
175
176
177       Specify how long to wait after starting the command specified using the
178       --healthcheck option to wait for the command to return its exit status.
179       If the command has not returned within this time, it should be  consid‐
180       ered to have failed.
181
182
183       Note:  this  setting is not present in the OCIv1 image format, so it is
184       discarded when writing images using OCIv1 formats.
185
186
187       --history-comment comment
188
189
190       Sets a comment on the topmost layer in any images which will be created
191       using the specified container.
192
193
194       --hostname host
195
196
197       Set  the  hostname  to  set when running containers based on any images
198       built using the specified container.
199
200
201       Note: this setting is not present in the OCIv1 image format, so  it  is
202       discarded when writing images using OCIv1 formats.
203
204
205       --label label=value
206
207
208       Add an image label (e.g. label=value) to the image configuration of any
209       images which will be built using the specified container. Can  be  used
210       multiple  times.   If label has a trailing -, then the label is removed
211       from the config.
212
213
214       --onbuild onbuild command
215
216
217       Add an ONBUILD command to the image.  ONBUILD  commands  are  automati‐
218       cally run when images are built based on the image you are creating.
219
220
221       Note:  this  setting is not present in the OCIv1 image format, so it is
222       discarded when writing images using OCIv1 formats.
223
224
225       --os operating system
226
227
228       Set the target operating system for any  images  which  will  be  built
229       using  the specified container.  By default, if the container was based
230       on an image, its  OS  is  kept,  otherwise  the  host's  OS's  name  is
231       recorded.
232
233
234       --port port
235
236
237       Add  a port to expose when running containers based on any images which
238       will be built using the  specified  container.  Can  be  used  multiple
239       times.
240
241
242       --shell shell
243
244
245       Set  the default shell to run inside of the container image.  The shell
246       instruction allows the default shell used for the shell  form  of  com‐
247       mands  to  be  overridden.  The  default  shell for Linux containers is
248       "/bin/sh -c".
249
250
251       Note: this setting is not present in the OCIv1 image format, so  it  is
252       discarded when writing images using OCIv1 formats.
253
254
255       --stop-signal signal
256
257
258       Set  default  stop  signal for container. This signal will be sent when
259       container is stopped, default is SIGINT.
260
261
262       --user user[:group]
263
264
265       Set the default user to be used when running containers based  on  this
266       image.   The  user  can  be specified as a user name or UID, optionally
267       followed by a group name or GID, separated by a colon (':').  If  names
268       are  used,  the container should include entries for those names in its
269       /etc/passwd and /etc/group files.
270
271
272       --volume volume
273
274
275       Add a location in the directory tree which should be marked as a volume
276       in any images which will be built using the specified container. Can be
277       used multiple times. If volume has a trailing -, and  is  already  set,
278       then the volume is removed from the config.
279
280
281       --workingdir directory
282
283
284       Set  the initial working directory for containers based on images which
285       will be built using the specified container.
286
287

EXAMPLE

289       buildah config --author='Jane Austen'  --workingdir='/etc/mycontainers'
290       containerID
291
292
293       buildah config --entrypoint /entrypoint.sh containerID
294
295
296       buildah config --entrypoint '[ "/entrypoint.sh", "dev" ]' containerID
297
298
299       buildah config --env foo=bar --env PATH=$PATH containerID
300
301
302       buildah config --env foo- containerID
303
304
305       buildah  config  --label  Name=Mycontainer  --label   Version=1.0  con‐
306       tainerID
307
308
309       buildah config --label Name- containerID
310
311
312       buildah config --annotation note=myNote containerID
313
314
315       buildah config --annotation note-
316
317
318       buildah config --volume /usr/myvol containerID
319
320
321       buildah config --volume /usr/myvol- containerID
322
323

SEE ALSO

325       buildah(1)
326
327
328
329buildah                           March 2017                 buildah-config(1)
Impressum