Dev Containers with Podman inside a Distrobox on Silverblue

I’m on Fedora Silverblue. So far, I have been developing (LaTeX documents) inside a fedora distrobox inside which I installed vscode and texlive using dnf. I would like to instead use latex from this docker image. I think Silverblue should be perfect for a container workflow, but I’m not sure how to set it up. Since podman is preinstalled on the Silverblue host, I want to use (rootless) podman.

What I was trying:

  1. On the host: systemctl --user enable --now podman.socket
  2. Create a Distrobox based on the fedora image, install sudo dnf install podman podman-remote code.
  3. Try to run a docker image inside my distrobox. This works fine:
podman-remote run --rm -it alpine

This doesn’t:

podman run --rm -it alpine

I guess I want to use podman-remote in order to use the systemd service running on the host.

  1. Running inside my distrobox podman info --format '{{.Host.RemoteSocket.Path}}' outputs
/run/user/1000/podman/podman.sock
  1. Now I run code . inside my distrobox and I install the dev container extension.
  2. From VSCode I click New Dev Container. (Expectedly), it fails, saying I need to install docker.
  3. The Dev Container extension has the options dev.containers.dockerPath and dev.containers.dockerSocketPath I can set. I’m setting dev.containers.dockerSocketPath to /run/user/1000/podman/podman.sock and for dev.containers.dockerPath I’m setting podman. If i try to start a dev container (based on a small alpine image for simplicity), it downloads the image but eventually fails with
Error: creating build container: unable to copy from source docker://mcr.microsoft.com/devcontainers/base:alpine-3.22: copying system image from manifest list: writing blob: adding layer with blob "sha256:2d35ebdb57d9971fea0cac1582aa78935adf8058b2cc32db163c98822e5dfa1b"/""/"sha256:256f393e029fa2063d8c93720da36a74a032bed3355a2bc3e313ad12f8bde9d1": unpacking failed (error: exit status 1; output: potentially insufficient UIDs or GIDs available in user namespace (requested 0:42 for /etc/shadow): Check /etc/subuid and /etc/subgid if configured locally and run "podman system migrate": lchown /etc/shadow: invalid argument)
  1. If I try to instead set dev.containers.dockerPath to podman-remote, it fails immediately with
[127692 ms] Start: Run: podman-remote version --format {{json .}}
[128016 ms] Error: failed to obtain system memory info: getting host info: getting available cgroup controllers: failed while reading controllers for cgroup v2: open /sys/fs/cgroup/user.slice/user-1000.slice/user@1000.service/app.slice/podman.service/cgroup.controllers: no such file or directory

Since all of this is completely new to me, I’m not sure what to do and I would be very glad about some help.