docker:tldr:ba1ef
The docker commit
command in Docker is used to create a new image based on the changes made in a container.
In the given command, the following parameters are used:
-
--change
: This parameter is used to specify a change to apply to the container before creating the new image. In this case, it is an environment variable change specified in the format"ENV ${name}=${value}"
, where${name}
is the name of the environment variable and${value}
is its value. -
${container}
: This is the name or ID of the container that you want to create a new image from. -
${image}:${tag}
: This specifies the name and tag of the new image that will be created.
By executing the docker commit
command with these parameters, Docker will create a new image by taking the current state of the specified container and applying the specified change (environment variable) in that container. The resulting image will be tagged with the specified name and tag.