I'm trying to containerize the Acronis Backup agent, but it's challenging because the installation spreads files all over different directories in the Linux filesystem. I've attempted to capture these directories using various Docker volumes, but I always seem to overlook something essential, even when I try to cover major directories like /etc and /usr. Are there any troubleshooting tips or specific containers that could assist me with this process?
2 Answers
I've actually found a useful method to tackle this. Start a clean container for your environment using a command like `docker run -it --name justtesting ubuntu /bin/bash`, then install or run your application to see where it places files. You can check the layer where Docker stores the changes by running `docker inspect justtesting | grep UpperDir` and then find what changed using `sudo find /var/lib/docker/overlay2/.../diff`. This should show you all new files in the container; you can later use this info to create appropriate volumes for them.
Why not just build your own Docker image from the ground up? Typically, your volumes should primarily include user data and configuration files instead of trying to pack the whole program into them. This way, the image stays clean and more efficient.
I see your point! I was trying to get a fully functional image, but maybe a leaner setup is better.
That's a neat trick! But how do you actually go about capturing those directories to set up your volumes?