不推荐直接修改容器后commit,当然,如果必须的话,那么可以继续看,毕竟dockerfile更容易看清楚每一步操作。
相关参数示例:
Name, shorthand | Default | Description |
|
Author (e.g., “John Hannibal Smith hannibal@a-team.com”) | |
|
Apply Dockerfile instruction to the created image | |
|
Commit message | |
|
|
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 参数示例