How to recover a stopped docker container that has ended from space?

I have a docker container that has reached the default limit of 10 GB, and now I can no longer run it. This is the error I get:

Answer to the error from the daemon: it is not possible to start the dfc container: install mount namespace cannot create pivot_root dir, error mkdir / var / lib / docker / devicemapper / mnt / dfc 2df0ba006762d44e13a3fe12b113a970ca7d91a530a8af1e82178d22f5608iv / 375075p8iv / 37075p8ivpot / 5608ivp060piv0ivp0ivp0iviv060ivp5608iv2f26075f2f260f2f0602f0f2f060f1608f2f060bf060bf060bf060bf060bf060bfc 12 15:32:58 Error: failed to start one or more containers

There is a blog post explaining how to increase the size of the container beyond 10 GB, but he sees that the container is running. In my case, it stopped and I cannot find the correct device in / dev / mapper.

Is there a way to increase the size of the container so that I can regain access to my container?

+5
source share
1 answer

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

I explained this in a post.

Basically you do the following:

  • Save container as image using docker capture
  • Save the new image as a tar file to disk using docker save
  • Reconfigure the default space for each container as described in post
  • In the previous step, all local images and containers will be deleted, but you saved your image as a tar file on disk.
  • Download the image you saved earlier using docker download
  • Launch a new container from a freshly loaded image using docker run
+1
source

Source: https://habr.com/ru/post/1210923/


All Articles