docker:tldr:8f13c
The command docker commit
is used to create a new image from a running container. Here's the breakdown of the command you provided:
-
--message="${comment}"
: This option allows you to provide a description or message for the commit, describing the changes made to the image.${comment}
is a placeholder for the actual comment you want to include. -
${container}
: This is the identifier or name of the existing container that you want to create an image from. -
${image}:${tag}
: This specifies the name and optional tag for the new image that will be created.${image}
is the desired name of the image, and${tag}
is an optional tag to differentiate different versions of the image.
Overall, the command docker commit --message="${comment}" ${container} ${image}:${tag}
takes a running container, makes it into a new image, and assigns it a name and tag, while also providing a descriptive message for the commit.