美文网首页
Save an image file from running

Save an image file from running

作者: 酸辣粉_2329 | 来源:发表于2019-07-30 02:52 被阅读0次

    从一个正在运行的container提取出docker image,保存到一个tar文件里,方便传输。

    docker commit my-container
    sha256:84eeb121cf5d95565c3c6e1a4a5d1fcc2cfd2598e549246e65bb40f8b14aaef3
    
    docker images
    REPOSITORY              TAG                 IMAGE ID            CREATED             SIZE
    <none>                  <none>              84eeb121cf5d        3 seconds ago       64.2MB
    
    docker tag 84eeb121cf5d my-img:18.04
    
    docker save --output my-img.tar my-img:18.04
    
    docker load --input my-img.tar
    

    相关文章

      网友评论

          本文标题:Save an image file from running

          本文链接:https://www.haomeiwen.com/subject/knvwrctx.html