Getting VS Code devcontainers to work with Podman on Ubuntu 25.10 may require extra configuration to work smoothly - using an authentication service such as authd likely requires some additional steps.
Disclaimer: I did not reproduced these steps on a new machine to verify correctness. Most of these steps are non-destructive, but obviously use your best judgement.
1. Stale login name in /etc/subuid and /etc/subgid
If you migrated from a temporary local user to an authd account, your /etc/subuid and /etc/subgid files might still be pointing to your old username. Podman needs these to be accurate.
The Fix: Replace the stale username with your current uid or username in both files.
-
Find your current
uid.Shell
$ id -u -
Update both
/etc/subuidand/etc/subgid(e.g., replacingoldname):Before
olduid:100000:65536After
123456789:100000:65536
2. Requirements for devcontainer.json
By default, VS Code tries to remap your local UID into the container. This fails in Podman environments when the uid is unusually large (most commonly seen with a corporate identity provider). You need to tell VS Code to use the container’s default user instead.
The changes required for devcontainer.json:
JSON
{
// The crucial Podman fixes:
"updateRemoteUserUID": false,
"containerUser": "ubuntu",
// Other settings as normal.
...
}
3. Snap updates to VS Code break Podman
Because VS Code is a Snap, it lives in versioned directories (like .../snap/code/233 and .../snap/code/234). Podman stores absolute paths in its internal database (should it? I’m not convinced). When VS Code updates, the path changes which causes Podman consistency checks fail, and you get a database configuration mismatch error when launching a container.
The Fix: Move Podman’s storage out of the Snap’s versioned directory and into a stable location in your home folder.
-
Remove all of podman’s persistent data - Warning: destructive!:
$ rm -rf ~/snap/code/current/.local/share/containers -
Set a persistent path in
~/.config/containers/storage.conf:[storage] driver = "overlay" graphroot = "/home/your.user/.local/share/containers/storage" -
Verify the change:
$ podman system info | grep graphRoot: -
Build a new container
Container files should appear in the new graphroot location.
When VS Code updates to the next version, the Podman path will not change, and your environment should not break.
My Environment
- OS: Ubuntu 25.10
- Podman: 5.4.2 (deb)
- VS Code: Version 234 (Snap)
- Auth:
authd