How to recover a stopped docker container which ran out of space?

前端 未结 1 1971
被撕碎了的回忆
被撕碎了的回忆 2021-02-10 02:20

I\'ve got a docker container that reached the default 10GB limit, and now I cannot start it anymore. This is the error I receive:

Error response from daem

1条回答
  •  我在风中等你
    2021-02-10 02:47

    It is not trivial but possible. I did it once on RedHat7. It will probably not work with older versions of Centos/Redhat.

    I explained it in this post.

    Basically, you perform these steps:

    • Save the container as an image, using docker commit
    • Save the new image as a tar file on disk, using docker save
    • Reconfigure the default space per container, as explained in this post
    • In the previous step will loose all local images and containers, but you have saved your image as a tar file on disk.
    • Load the image you previousley saved, using docker load
    • Run a new container from the just loaded image, using docker run

    0 讨论(0)
提交回复
热议问题