When I want to delete all my container I see that error
Command:
docker rm $(docker ps -aq)
the error is:
Error response from daemon: driver "overlay2" failed to remove root filesystem for 4bf2fc329d2fab3c055dd136a740c5ee2000e35e26fea6a38c94801fd8dfb109: remove /var/lib/docker/overlay2/7991f36adaa25d4046ef6106c3da8bbbb1f3ce7478b07a30021669a7783b4b6c/diff/root/.ipython: read-only file system
Also I have tried
docker rm -f $(docker ps -aq)
But the result was the same
Also I have tried to delete that image:
docker rmi -f <images_id>
And the result was the same.
How can I delete the container?
How To Clean Up Docker Overlay2? In order to clean up unused containers and images, we can use the docker system prune. A prune will never remove consists of: Operational containers.
You can clean what is unused but you should never remove data manually from /var/lib/docker/volumes and/or /var/lib/docker/overlay2. Manually deleting files under /var/lib/docker can result in data loss. Read the Docker command line reference before running any of these commands.
overlay2. overlay2 is the preferred storage driver for all currently supported Linux distributions, and requires no extra configuration. fuse-overlayfs. fuse-overlayfs is preferred only for running Rootless Docker on a host that does not provide support for rootless overlay2 .
Check what your filesystem is: moby/moby issue 9939 reports:
Does the overlay2 driver work on a btrfs file system?
The documentation says only ext4 and xfs are supported.
See also if docker system prune
can help.
Restarting the computer, to clear any locked file can help too.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With