docker commit 参数示例

不推荐直接修改容器后commit,当然,如果必须的话,那么可以继续看,毕竟dockerfile更容易看清楚每一步操作。

相关参数示例:

Name, shorthand Default Description
--author , -a
Author (e.g., “John Hannibal Smith hannibal@a-team.com”)
--change , -c
Apply Dockerfile instruction to the created image
--message , -m
Commit message
--pause , -p
true
Pause container during commit

示例:

docker commit --change "ENV DEBUG true" c3f279d17e0a  svendowideit/testimage:version3

整理自:https://docs.docker.com/engine/reference/commandline/commit/#usage


未经允许不得转载:阿藏博客 » docker commit 参数示例