docker commit [OPTIONS] CONTAINER [REPOSITORY[:TAG]]

docker commit提交容器副本,使之成为一个新的镜像。
docker commit -m=”提交的描述信息” -a=”作者” 容器ID 要创建的目标镜像名:[标签名]

options

  • -a,添加作者信息
  • -m,添加镜像说明
  • -p,在提交容器期间暂停容器的运行
  • -c, —change list Apply Dockerfile instruction to the created image

    案例

    1. docker commit -m="vim cmd" -a="windf" af0cae4b3601 windf/ubuntu-vim:1.0

    本地镜像发布到阿里云流程

    截图_选择区域_20220527194021.png