以下两个命令有什么区别:
docker container commit
docker commit
我阅读了这两个命令的文档,但找不到两个命令之间的任何区别(两个命令也包含相同的选项)。
https://docs.docker.com/engine/reference/commandline/commit/ https://docs.docker.com/engine/reference/commandline/container_commit/
这两个命令的帮助页面在 Docker 19.03 上显示相同的输出
Usage: docker container commit [OPTIONS] CONTAINER [REPOSITORY[:TAG]]
Create a new image from a container's changes
Options:
-a, --author string Author (e.g., "John Hannibal Smith <hannibal@a-team.com>")
-c, --change list Apply Dockerfile instruction to the created image
-m, --message string Commit message
-p, --pause Pause container during commit (default true)