ThinkChat🤖让你学习和工作更高效,注册即送10W Token,即刻开启你的AI之旅 广告
## docker commit 制作镜像 ~~~ docker commit [-a|--author] [-c|--change] [-m|--message] [-p|--pause] CONTAINER [REPOSITORY[:TAG]] ~~~ ### 参数 ~~~ -a, --author="" 指定作者信息 -c , --change=[] Apply specified Dockerfile instructions while committing the image Supported Dockerfile instructions: CMD|ENTRYPOINT|ENV|EXPOSE|LABEL|ONBUILD|USER|VOLUME|WORKDIR -m, --message="" 提交的说明信息 -p, --pause=true|false 在commit时默认暂停容器 ~~~ >[danger]docker commit会造成黑箱镜像,每次修改都会使镜像更加臃肿,完全发挥不出分层存储的优势。 ## docker diff 查看镜像存储层变化 ## docker history ~~~ docker history [OPTIONS] IMAGE ~~~ ~~~ --no-trunc 截断显示输出 -q, --quiet 只显示镜像ID ~~~