Home  >  Q&A  >  body text

docker commit无法保存改动

使用dockerfile构建镜像,ssh登录修改tomcat文件配置,关闭container后使用docker commit保存修改,重启container后发现修改后的文件没有保存,这是为什么呢?

黄舟黄舟2761 days ago761

reply all(2)I'll reply

  • 天蓬老师

    天蓬老师2017-04-21 10:58:19

    Open another terminal to commit.

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-21 10:58:19

    It may be that VOLUME is causing trouble...The shared directory specified in VOLUME cannot be saved, so the above situation occurs. After removing the relevant configuration in the Dockerfile, you can commit normally.

    reply
    0
  • Cancelreply