How can I properly containerize an application that installs across the entire Linux filesystem?

0
9
Asked By CuriousCoder88 On

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

Answered By CodeCatcher99 On

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.

ImpressedUser21 -

That's a neat trick! But how do you actually go about capturing those directories to set up your volumes?

Answered By TechieTom14 On

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.

CuriousCoder88 -

I see your point! I was trying to get a fully functional image, but maybe a leaner setup is better.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.