Answer the question
In order to leave comments, you need to log in
How to organize the /var/lib/docker/ folder with the given docker so that each container is a separate directory?
I'm trying to figure out and organize the work of my tasks using docker.
Everything is fine, but the raw storage method is somewhat annoying.
All data is stored in the /var/lib/docker/ folder, and it is very difficult to visually understand which files belong to which container.
Is there any mechanism for organizing this folder so that information about each container is stored in a separate folder or even better img image, like virtual machine snapshots.
For example, I will need to physically distribute containers on different disks on one host. How to do this now I have no idea.
Answer the question
In order to leave comments, you need to log in
Easy, mount the desired path from the host to the container at the desired path, do not touch /var/lib/docker.
In your container, the main volume is not the container image itself, but some data, for example, database files, so connect the required path from the host to /var/lib/mysql of the container.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question