Update cheatsheets

This commit is contained in:
ivuorinen
2025-12-20 00:20:53 +00:00
parent 596a37b175
commit 11f02a6e11
615 changed files with 952 additions and 972 deletions

View File

@@ -5,33 +5,8 @@ source: https://github.com/tldr-pages/tldr.git
---
# docker commit
> Create a new image from a container's changes.
> More information: <https://docs.docker.com/reference/cli/docker/container/commit/>.
> This command is an alias of `docker container commit`.
- Create an image from a specific container:
- View documentation for the original command:
`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`
`tldr docker container commit`