Podman Provider Setup
Podman is a built-in Devsy provider. It runs containers without a background daemon and is OCI-compatible, so most devcontainer.json files work unchanged. See known differences for the exceptions.
This page covers installing Podman, adding it as a provider, and starting a workspace.
Install Podman
Linux
Use your package manager:
sudo apt-get install -y podman # Debian / Ubuntu
sudo dnf install -y podman # Fedora / RHEL / CentOS
sudo pacman -S podman # ArchmacOS
brew install podman
podman machine init
podman machine startPodman Desktop also works.
Windows
Install the Windows Podman client and its WSL2-backed machine. Run Podman and Devsy from Windows, not from an executable installed only inside a WSL distribution.
In PowerShell, initialize and start the machine if it does not already exist:
podman machine init
podman machine start
podman infoUse the Windows named pipe from podman machine inspect for PODMAN_HOST, as described below. A Unix socket inside WSL is not a Windows endpoint. Check podman system connection list and make the connection for this machine the default: Devsy uses the native Podman client as well as the Docker-compatible API.
Add the provider
devsy provider add podmanOptions
| Option | Default | Description |
|---|---|---|
PODMAN_PATH | podman | Path to the podman binary, if it is not on PATH. |
PODMAN_HOST | unset | Podman API endpoint. On Windows, use the machine named pipe in npipe:////./pipe/<pipe-name> form, not a Unix socket inside WSL. On Linux and macOS, use unix:// followed by the socket path. |
PODMAN_ELEVATION | none | Run podman through pkexec, sudo or doas to reach a rootful socket the current user cannot access. Leave it as none for rootless Podman. pkexec needs a desktop session with a polkit agent, so use sudo or doas on headless hosts. |
INACTIVITY_TIMEOUT | unset | Stop the container after this idle time, for example 10m or 1h. |
For a provider you already added, update its options:
devsy provider set podman --option PODMAN_PATH=/usr/local/bin/podman
devsy provider get podmanAlternatively, set the option during the initial add instead of running the plain add command above:
devsy provider add podman -o PODMAN_PATH=/usr/local/bin/podmanRootless and rootful
Rootless is the default and the recommended setup. Containers run as your user. Use rootful only when a container must bind-mount root-owned paths or needs network setups such as macvlan.
On macOS and Windows, switch the Podman machine mode:
For a new machine:
podman machine init --rootful my-rootful-machine
podman machine start --update-connection my-rootful-machineOr switch the existing default machine:
podman machine stop
podman machine set --rootful
podman machine startSwitching mode does not delete images, containers or volumes. They are hidden while the other mode is active and return when you switch back.
On Linux, to reach a rootful socket without running everything as root, set PODMAN_ELEVATION to sudo or doas.
After switching modes, run podman machine inspect <machine-name> for the machine you started and update PODMAN_HOST:
- macOS: use
unix://followed by.ConnectionInfo.PodmanSocket.Path. - Windows: read
.ConnectionInfo.PodmanPipe.Pathand usenpipe:////./pipe/<pipe-name>, replacing<pipe-name>with the name after\\.\pipe\in that path.
Check podman system connection list and select the connection for the same machine and rootful/rootless mode with podman system connection default <connection-name>. PODMAN_HOST selects the Docker-compatible API; the native Podman CLI uses its own default connection. Keep PODMAN_ELEVATION as none, because the machine connection is already authenticated.
Start a workspace
devsy workspace up --provider podman --id my-workspace https://github.com/my-org/my-repo
devsy workspace ssh my-workspaceTroubleshooting
Socket not found or permission denied
Devsy cannot reach the Podman socket. On macOS and Windows, check that the machine is running with podman machine list, and start it with podman machine start. On Linux, check the user socket:
systemctl --user status podman.socketIf the socket path is not the default, set it:
devsy provider set podman --option PODMAN_HOST=unix:///run/user/$(id -u)/podman/podman.sockKnown differences
Dockerfile builds
Podman builds with Buildah, not BuildKit. BuildKit-only syntax, such as RUN --mount=type=cache under the buildkit frontend, can fail. Remove the # syntax=docker/dockerfile:1 line or rewrite those steps.
Compose
podman compose hands off to an external provider: the podman-compose package or a standalone docker-compose binary. Install one:
sudo apt-get install -y podman-composeThe docker-compose-plugin package does not work here. It adds the docker compose subcommand to the Docker CLI and pulls in Docker. Check what is available:
podman compose versionUse podman compose instead of docker-compose in your scripts.