I'm trying to containerize the Acronis Backup agent, which installs components all over the Linux filesystem. I've attempted to set up different Docker volumes for various directories, but I keep missing some critical files. I've already tried including major directories like /etc and /usr, but it doesn't seem to work as expected. Are there any specific containers or methods that could help me in this process?
2 Answers
I like to use Docker in a slightly unconventional way. You could start a clean container for your testing environment using something like `docker run -it --name justtesting ubuntu /bin/bash`, then create the necessary files inside it. Afterward, inspect where Docker is storing this layer. You can use the `docker inspect justtesting | grep UpperDir` command to find the paths you're interested in and work from there to capture them into volumes.
Have you thought about building your own Docker image? Your volumes should probably just focus on user data and config files, instead of trying to capture the whole app. It's less messy that way and you can keep the important bits organized.
I'm doing all this to create a functional image, so I'm not sure that approach fully meets my needs.
That's a neat trick! How would I go about capturing those directories into a volume later?