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