Hosting podman in an LXD container

I’ve been using podman within an LXD VM as a docker host and it works well - no different than running docker directly in a VM.

I noticed that there are quite a number of posts from those who run docker in an LXC container, so it made me wonder if podman could be run that way as well - ideally without being privileged.

Any pointers on getting this to work inLXD? I have seen various posts about difficulties with

  • hostnamectl
  • overlayfs
  • cgroups2
  • privileged versus unprivileged
  • dbus
  • rootless versus rooted

I have not read a single post where someone has successfully run podman within LXD, so I am wondering why it is so much harder to make work than running docker in LXC.

Even though my LXD VM works just fine, a container would be lighter weight.

1 Like

Do you mean a LXC container or a LXD container?

See for the difference.

Thanks. I meant LXD. I have been an LXD user for some time now and I am aware of the difference. This question is about the challenges, if any, of running podman in an LXD container.

I am asking because I have standardized on LXD as my container platform after coming from Proxmox years ago. Still, there are workloads that are best addressed with docker or kubernetes, though I still want to host those in LXD as well. Ideally, I will use LXD containers in every case unless a VM is absolutely necessary.

You may have some success following the steps for running docker inside LXD as they are similar: