docker-commit - Man Page
Create a new image from a container's changes
Examples (TL;DR)
- Create an image from a specific container:
docker commit container image:tag
- Apply a
CMD
Dockerfile instruction to the created image:docker commit [-c|--change] "CMD command" container image:tag
- Apply an
ENV
Dockerfile instruction to the created image:docker commit [-c|--change] "ENV name=value" container image:tag
- Create an image with a specific author in the metadata:
docker commit [-a|--author] "author" container image:tag
- Create an image with a specific comment in the metadata:
docker commit [-m|--message] "comment" container image:tag
- Create an image without pausing the container during commit:
docker commit [-p|--pause] false container image:tag
- Display help:
docker commit --help
Synopsis
docker commit [Options] CONTAINER [REPOSITORY[:TAG]]
Description
Alias for docker container commit.
Options
-a, --author="" Author (e.g., "John Hannibal Smith hannibal@a-team.com ⟨mailto:hannibal@a-team.com⟩")
-c, --change= Apply Dockerfile instruction to the created image
-m, --message="" Commit message
-p, --pause[=true] Pause container during commit
See Also
Info
Apr 2025 Docker Community Docker User Manuals