I have a problem with my docker environment since I recently restarted my system.
I have the following setup:
Installed Version: Docker version 23.0.1, build a5ee5b1
OS: Ubuntu 22.04.2 LTS running as LXC container in Proxmox
After an update of Proxmox and a restart of my host and the dockerhost-LXC, docker is not starting/listing my previous containers anymore:
docker container ls -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
docker images -a
REPOSITORY TAG IMAGE ID CREATED SIZE
‘docker volume ls’ does list my volumes however.
Looking into the filesystem in /var/lib/docker I see the folders of my containers in /var/lib/containers. For some reason the docker daemon does not find them.
The structure in each folder looks like this:
I would put my money on “the determined default storage driver changed”.
Containers and images are bound to a storage driver when pulled/created. If the storage driver changes, it will look like existing images and containers are gone. Though, what really happens is that the changed storage driver isn’t able to work with existing images and containers from the previous storage driver.
You can check the storage driver the container uses like this:
My bad, it should have been /etc/docker/daemon.json. If it doesn’t exist, you can create it.
Seems the overlay2 support wasn’t there earlier. It is definitely the storage driver you want to go with, as it’s the most performant and efficient storage driver. Vfs on the other hand is everything but efficient (=wast’s a lot of space), is slower and according the docs not recommended for productive systems.
Personally, I would switch back to vfs to clean all images and containers, and start over with the overlay2 storage driver. Neither images nor containers are worth being backed up, as you can pull or build an image again, and can easily create containers again. Volumes on the other hand would be wort to be backed up, but they are not affected by teh storage driver → you can use them as they are…