.nh .TH buildah-config "1" "March 2017" "buildah" .SH NAME .PP buildah-config - Update image configuration settings. .SH SYNOPSIS .PP \fBbuildah config\fP [\fIoptions\fP] \fIcontainer\fP .SH DESCRIPTION .PP Updates one or more of the settings kept for a container. .SH OPTIONS .PP \fB--add-history\fP .PP Add an entry to the image's history which will note changes to the settings for \fB--cmd\fP, \fB--entrypoint\fP, \fB--env\fP, \fB--healthcheck\fP, \fB--label\fP, \fB--onbuild\fP, \fB--port\fP, \fB--shell\fP, \fB--stop-signal\fP, \fB--user\fP, \fB--volume\fP, and \fB--workingdir\fP\&. Defaults to false. .PP Note: You can also override the default value of --add-history by setting the BUILDAH_HISTORY environment variable. \fBexport BUILDAH_HISTORY=true\fR .PP \fB--annotation\fP, \fB-a\fP \fIannotation\fP=\fIannotation\fP .PP Add an image \fIannotation\fP (e.g. annotation=\fIannotation\fP) to the image manifest of any images which will be built using the specified container. Can be used multiple times. If \fIannotation\fP has a trailing \fB-\fR, then the \fIannotation\fP is removed from the config. If the \fIannotation\fP is set to "-" then all annotations are removed from the config. .PP \fB--arch\fP \fIarchitecture\fP .PP Set the target \fIarchitecture\fP for any images which will be built using the specified container. By default, if the container was based on an image, that image's target architecture is kept, otherwise the host's architecture is recorded. .PP \fB--author\fP \fIauthor\fP .PP Set contact information for the \fIauthor\fP for any images which will be built using the specified container. .PP \fB--cmd\fP \fIcommand\fP .PP Set the default \fIcommand\fP to run for containers based on any images which will be built using the specified container. When used in combination with an \fIentry point\fP, this specifies the default parameters for the \fIentry point\fP\&. .PP \fB--comment\fP \fIcomment\fP .PP Set the image-level comment for any images which will be built using the specified container. .PP Note: this setting is not present in the OCIv1 image format, so it is discarded when writing images using OCIv1 formats. .PP \fB--created-by\fP \fIcreated\fP .PP Set the description of how the topmost layer was \fIcreated\fP for any images which will be created using the specified container. .PP \fB--domainname\fP \fIdomain\fP .PP Set the domainname to set when running containers based on any images built using the specified container. .PP Note: this setting is not present in the OCIv1 image format, so it is discarded when writing images using OCIv1 formats. .PP \fB--entrypoint\fP \fI"command"\fP | \fI\&'["command", "arg1", ...]'\fP .PP Set the \fIentry point\fP for containers based on any images which will be built using the specified container. buildah supports two formats for entrypoint. It can be specified as a simple string, or as an array of commands. .PP Note: When the entrypoint is specified as a string, container runtimes will ignore the \fBcmd\fR value of the container image. However if you use the array form, then the cmd will be appended onto the end of the entrypoint cmd and be executed together. .PP \fB--env\fP, \fB-e\fP \fIenv[=value]\fP .PP Add a value (e.g. env=\fIvalue\fP) to the environment for containers based on any images which will be built using the specified container. Can be used multiple times. If \fIenv\fP is named but neither \fB=\fR nor a \fBvalue\fR is specified, then the value will be taken from the current process environment. If \fIenv\fP has a trailing \fB-\fR, then the \fIenv\fP is removed from the config. If the \fIenv\fP is set to "-" then all environment variables are removed from the config. .PP \fB--healthcheck\fP \fIcommand\fP .PP Specify a command which should be run to check if a container is running correctly. .PP Values can be \fINONE\fP, "\fICMD\fP ..." (run the specified command directly), or "\fICMD-SHELL\fP ..." (run the specified command using the system's shell), or the empty value (remove a previously-set value and related settings). .PP Note: this setting is not present in the OCIv1 image format, so it is discarded when writing images using OCIv1 formats. .PP \fB--healthcheck-interval\fP \fIinterval\fP .PP Specify how often the command specified using the \fI--healthcheck\fP option should be run. .PP Note: this setting is not present in the OCIv1 image format, so it is discarded when writing images using OCIv1 formats. .PP \fB--healthcheck-retries\fP \fIcount\fP .PP Specify how many times the command specified using the \fI--healthcheck\fP option can fail before the container is considered to be unhealthy. .PP Note: this setting is not present in the OCIv1 image format, so it is discarded when writing images using OCIv1 formats. .PP \fB--healthcheck-start-period\fP \fIinterval\fP .PP Specify how much time can elapse after a container has started before a failure to run the command specified using the \fI--healthcheck\fP option should be treated as an indication that the container is failing. During this time period, failures will be attributed to the container not yet having fully started, and will not be counted as errors. After the command succeeds, or the time period has elapsed, failures will be counted as errors. .PP Note: this setting is not present in the OCIv1 image format, so it is discarded when writing images using OCIv1 formats. .PP \fB--healthcheck-timeout\fP \fIinterval\fP .PP Specify how long to wait after starting the command specified using the \fI--healthcheck\fP option to wait for the command to return its exit status. If the command has not returned within this time, it should be considered to have failed. .PP Note: this setting is not present in the OCIv1 image format, so it is discarded when writing images using OCIv1 formats. .PP \fB--history-comment\fP \fIcomment\fP .PP Sets a comment on the topmost layer in any images which will be created using the specified container. .PP \fB--hostname\fP \fIhost\fP .PP Set the hostname to set when running containers based on any images built using the specified container. .PP Note: this setting is not present in the OCIv1 image format, so it is discarded when writing images using OCIv1 formats. .PP \fB--label\fP, \fB-l\fP \fIlabel\fP=\fIvalue\fP .PP Add an image \fIlabel\fP (e.g. label=\fIvalue\fP) to the image configuration of any images which will be built using the specified container. Can be used multiple times. If \fIlabel\fP has a trailing \fB-\fR, then the \fIlabel\fP is removed from the config. If the \fIlabel\fP is set to "-" then all labels are removed from the config. .PP \fB--onbuild\fP \fIonbuild command\fP .PP Add an ONBUILD command to the image. ONBUILD commands are automatically run when images are built based on the image you are creating. .PP Note: this setting is not present in the OCIv1 image format, so it is discarded when writing images using OCIv1 formats. .PP \fB--os\fP \fIoperating system\fP .PP Set the target \fIoperating system\fP for any images which will be built using the specified container. By default, if the container was based on an image, its OS is kept, otherwise the host's OS's name is recorded. .PP \fB--os-feature\fP \fIfeature\fP .PP Set the name of a required operating system \fIfeature\fP for any images which will be built using the specified container. By default, if the container was based on an image, the base image's required OS feature list is kept, if it specified one. This option is typically only meaningful when the image's OS is Windows. .PP If \fIfeature\fP has a trailing \fB-\fR, then the \fIfeature\fP is removed from the set of required features which will be listed in the image. If the \fIfeature\fP is set to "-" then the entire features list is removed from the config. .PP \fB--os-version\fP \fIversion\fP .PP Set the exact required operating system \fIversion\fP for any images which will be built using the specified container. By default, if the container was based on an image, the base image's required OS version is kept, if it specified one. This option is typically only meaningful when the image's OS is Windows, and is typically set in Windows base images, so using this option is usually unnecessary. .PP \fB--port\fP, \fB-p\fP \fIport/protocol\fP .PP Add a \fIport\fP to expose when running containers based on any images which will be built using the specified container. Can be used multiple times. To specify whether the port listens on TCP or UDP, use "port/protocol". The default is TCP if the protocol is not specified. To expose the port on both TCP and UDP, specify the port option multiple times. If \fIport\fP has a trailing \fB-\fR and is already set, then the \fIport\fP is removed from the configuration. If the port is set to \fB-\fR then all exposed ports settings are removed from the configuration. .PP \fB--shell\fP \fIshell\fP .PP Set the default \fIshell\fP to run inside of the container image. The shell instruction allows the default shell used for the shell form of commands to be overridden. The default shell for Linux containers is "/bin/sh -c". .PP Note: this setting is not present in the OCIv1 image format, so it is discarded when writing images using OCIv1 formats. .PP \fB--stop-signal\fP \fIsignal\fP .PP Set default \fIstop signal\fP for container. This signal will be sent when container is stopped, default is SIGINT. .PP \fB--unsetlabel\fP \fIlabel\fP .PP Unset the image label, causing the label not to be inherited from the base image. .PP \fB--user\fP, \fB-u\fP \fIuser\fP[:\fIgroup\fP] .PP Set the default \fIuser\fP to be used when running containers based on this image. The user can be specified as a user name or UID, optionally followed by a group name or GID, separated by a colon (':'). If names are used, the container should include entries for those names in its \fI/etc/passwd\fP and \fI/etc/group\fP files. .PP \fB--variant\fP \fIvariant\fP .PP Set the target architecture \fIvariant\fP for any images which will be built using the specified container. By default, if the container was based on an image, that image's target architecture and variant information is kept, otherwise the host's architecture and variant are recorded. .PP \fB--volume\fP, \fB-v\fP \fIvolume\fP .PP Add a location in the directory tree which should be marked as a \fIvolume\fP in any images which will be built using the specified container. Can be used multiple times. If \fIvolume\fP has a trailing \fB-\fR, and is already set, then the \fIvolume\fP is removed from the config. If the \fIvolume\fP is set to "-" then all volumes are removed from the config. .PP \fB--workingdir\fP \fIdirectory\fP .PP Set the initial working \fIdirectory\fP for containers based on images which will be built using the specified container. .SH EXAMPLE .PP buildah config --author='Jane Austen' --workingdir='/etc/mycontainers' containerID .PP buildah config --entrypoint /entrypoint.sh containerID .PP buildah config --entrypoint '[ "/entrypoint.sh", "dev" ]' containerID .PP buildah config --env foo=bar --env PATH=$PATH containerID .PP buildah config --env foo- containerID .PP buildah config --label Name=Mycontainer --label Version=1.0 containerID .PP buildah config --label Name- containerID .PP buildah config --annotation note=myNote containerID .PP buildah config --annotation note- .PP buildah config --volume /usr/myvol containerID .PP buildah config --volume /usr/myvol- containerID .PP buildah config --port 1234 --port 8080 containerID .PP buildah config --port 514/tcp --port 514/udp containerID .PP buildah config --env 1234=5678 containerID .PP buildah config --env 1234- containerID .PP buildah config --os-version 10.0.19042.1645 containerID .PP buildah config --os-feature win32k containerID .PP buildah config --os-feature win32k- containerID .SH SEE ALSO .PP buildah(1)