Ideally, you would want to do this while remaining platform-agnostic, so your agents will be able to start a container no matter where they are themselves: on bare metal, in Podman, in Docker, in k8s.
Either way, it will be done. Ask IBM. What's the use case for running OS360 VMs inside OS360 VMs?
We repeat the same patterns IBM discovered in the 1960s, but with more building materials.
Power consumption and size/weight are better though. ;-)
The goal is container driven development. But if all my dev tools are inside a container, how do I iterate on building new containers within a container? This is the core feature I wanted.
But unfortunately, this challenge proved way too difficult to pull off and nothing seemed to work for me.
My guess is these setups heavily depend on the host machine and how podman was setup on it which breaks the entire value of using container driven dev.
On the flipside, LXD containers have "just worked" for everyone who has tried it so far. We've been able to use them on a whim for testing stuff, no problems at all.
So I've been wondering for a while if we could use LXD containers to provide a clean slate to run the Docker containers inside of, maybe then we'd at least all have the same problems, if not be able to solve them entirely.
https://ubuntu.com/tutorials/how-to-run-docker-inside-lxd-co...
If you use podman you can just use the default storage backend (zfs).
Containers being nestable components makes a lot of natural wants much more natural to express.
If all you want is resource constraints on your spawned processes, it's easier and more common to just use cgroups. It's straightforward and you should have a working understanding of cgroups anyway if you want to be effective at using containers, which are built on top of cgroups.
Cgroups are really easy to use and I feel like people aren't bothering to learn about it. :(
If you want, go right ahead with your managed, on-site VMs where you copy a .php file to an Apache server using a thumb drive and restart the service. I don't care. But that's not how modern teams are working.
I'd suggest you do more research. Plenty of teams in (very) big companies, handling (very) large workloads not doing what you'd want them to.
Docker? Docker is ideal for teams deploying quickly evolving (possible stateless) applications across multiple platforms. If you have no need to deploy across multiple platforms, simply deploy directly to your OS using the best primitives possible.
Kubernetes? Excellent for when you need to do multiple, rapid deployments per day of small (ideally stateless) services. A good example of this is small services that serve up adverts in response to some "profile" of a visitor sent to it from a browser - these things evolve a lot, and often.
Abstracting your abstractions because you don't want to learn how-to make the OS better or use what's already there isn't clever. Learning to use the tools is the important thing, and Docker and K8s are just tools.
https://github.com/hitchdev/hitchstory/tree/master/examples
In e.g. the website example, the parent podman container does everything from running the integration tests to converting a video of the test at the end into a slowed down GIF and combines it with screenshots to put in the docs. It orchestrates the child podman containers - playwright + the webapp.
I'm certain that if all this tooling were run on different host machines it would have a myriad of "works on my machine" problems all over the place - whether due to mac, WSL, weird linux distros, github actions idiosyncrasies or whatever.
I'm equally certain that if the tooling were bundled in the app container it would needlessly fatten it with unnecessary and potentially conflicting dependencies. I don't want video conversion tooling installed in my web app even if I do want it to generate my docs.