Options (5)
booleanCreate an image from a specific container
Example:
docker {{[commit|container commit]}} {{container}} {{image}}:{{tag}}-c, --changebooleanApply a `CMD` Dockerfile instruction to the created image
Example:
docker {{[commit|container commit]}} {{[-c|--change]}} "CMD {{command}}" {{container}} {{image}}:{{tag}}-a, --authorbooleanCreate an image with a specific author in the metadata
Example:
docker {{[commit|container commit]}} {{[-a|--author]}} "{{author}}" {{container}} {{image}}:{{tag}}-m, --messagebooleanCreate an image with a specific comment in the metadata
Example:
docker {{[commit|container commit]}} {{[-m|--message]}} "{{comment}}" {{container}} {{image}}:{{tag}}-p, --pausebooleanCreate an image without pausing the container during commit
Example:
docker {{[commit|container commit]}} {{[-p|--pause]}} false {{container}} {{image}}:{{tag}}Examples (7)
Create an image from a specific container
docker [commit|container commit] container image:tagApply a `CMD` Dockerfile instruction to the created image
docker [commit|container commit] [-c|--change] "CMD command" container image:tagApply an `ENV` Dockerfile instruction to the created image
docker [commit|container commit] [-c|--change] "ENV name=value" container image:tagCreate an image with a specific author in the metadata
docker [commit|container commit] [-a|--author] "author" container image:tagCreate an image with a specific comment in the metadata
docker [commit|container commit] [-m|--message] "comment" container image:tagCreate an image without pausing the container during commit
Display help
docker [commit|container commit] --helpmade by @shridhargupta | data from tldr-pages