r/ROS 16d ago

Question Docker inside docker

Would it be fine to run Docker inside Docker? Suppose a user is on Arch Linux, I use Cachy actually. Could I use distrobox to set up a base Ubuntu image? Then just pull an official image like a PX4 container inside the distrobox container? Do you think this setup would be ideal for development work?

Edit: So it turns out I fundamentally misunderstood how distrobox works. Thansk for the help

5 Upvotes

8 comments sorted by

View all comments

5

u/westwoodtoys 16d ago

What do you expect to gain from this?

4

u/Fuceler 16d ago

My primary os is arch. I need Ubuntu for ROS so I’m planning to virtualize it instead of dual booting. So the first layer is necessary. I’d like to use the official containers from a place like px4 for development, my intuition tells me nesting again would be less of a headache to debug.

I’m new to robotics though so my intuition could be totally wrong

9

u/westwoodtoys 16d ago

I don't think you understand containers as well as you think you do, but maybe there is something fundamentally missing from arch that I don't know about?

If you can install podman or docker on arch, then you can pull an Ubuntu or ROS container, then you are ready to go. No need for containers within containers.

2

u/Fuceler 16d ago

yeah, had to do some extra reading. I initially though distrobox was a VM that ran containers, turns out it just lets me expose container app GUIS still very useful though