Repository navigation
Description
Problem / motivation
docker isolation needs a Docker daemon, and Spec 111 (FR-022, D10) documents one way to supply it from a container: mount the host /var/run/docker.sock, which the spec itself calls root-equivalent control of the host. On a Linux server the same isolation can be had without that, using a rootless Podman API socket, but this is not documented or tested anywhere.
I tested it and it works with no code change. Setup on Ubuntu, Podman 5.7.0, the stock docker CLI 29.9.1, mcpproxy built from main (3558c53):
systemctl --user enable --now podman.socket # or: podman system service --time=0 unix:///path/podman.sock
export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/podman/podman.sock
mcpproxy serve ... # config: "docker_isolation": {"mode": "docker"}Results:
docker info --format '{{.ServerVersion}}'against the Podman socket returns5.7.0, so the availability probe passes.- mcpproxy direct-execs
/usr/bin/docker("Docker spawn: direct-exec of resolved docker binary") and the child ran in a container created by Podman from the defaultpythonisolation image (ghcr.io/astral-sh/uv:python3.13-bookworm-slim). - In that container the proxy's data directory is not visible, the container's loopback is not the host's (a connect to the proxy's listener is refused), only the image's own environment is present, and the process is uid 0 inside the container, which maps to the unprivileged host user.
DOCKER_HOSThas to be in mcpproxy's own environment (a systemdEnvironment=line, orenvironment:in compose);docs/docker-isolation.mdalready notes that it is read from there. When the Podman service was not running, the spawn failed withCannot connect to the Docker daemon at unix:///..., which is the right message.
I did not test the other route (the podman-docker shim that makes docker an alias for podman), or running mcpproxy inside a container with the Podman socket mounted.
Why it matters beyond my setup: with rootless Podman the blast radius of a compromised proxy is one unprivileged Linux user, not the host. It also gives stdio servers a real isolation boundary without Docker Desktop or a root daemon, which is what headless Linux users (153 long-lived installs in the Spec 111 numbers) have.
Proposed solution
Documentation only, plus one test if you want it:
- Add a "Rootless Podman" section to
docs/docker-isolation.mdwith the three lines above and theDOCKER_HOSTcaveat. - In Spec 111 FR-022/FR-023, list the rootless Podman socket as an alternative to mounting the host Docker socket, next to the existing warning.
- Optionally make the isolation status message say when the daemon in use is Podman (
docker inforeports it), which helps support requests.
Alternatives considered
- Docker-in-Docker: rejected already in D10 (privileged container).
- A socket proxy that filters the Docker API (for example
tecnativa/docker-socket-proxy): restricts which API calls the proxy can make, but still talks to a root daemon. I did not test it. sandboxmode: runs without Docker, but it does not stop reads of the data directory (see the separate issue about stdio children reading/data).
Which edition?
Both (personal and server).
- I searched existing issues and discussions for a similar request (searched Podman, rootless, DOCKER_HOST, isolation socket; nothing found; related: Spec 111 D10/D20,
docs/docker-isolation.md)
Activity
james-crowley commentedon Oct 20, 2026
Related: #1704 (stdio children can read the data directory), #1707 (compose example).
Dumbris commentedon Oct 20, 2026
Nice, and it makes sense that it just works since we only shell out to the docker CLI. Your test ran mcpproxy on the host with the Podman socket. Do you plan to run it inside a container with the socket mounted, which is the case the Spec 111 warning is about? If you do, could you note what socket permissions and user mapping it needed, so we can document that route too and not only the host-run one?
james-crowley commentedon Oct 20, 2026
Yes, tested in a container too. The proxy ran in
docker.io/library/docker:cli(it has the static docker CLI andsh), as a rootless Podman container (Podman 5.7.0), with the user-level socket bind-mounted (systemctl --user start podman.socketgives/run/user/<uid>/podman/podman.sock, mode 660, owned by the host user) andDOCKER_HOST=unix:///run/podman.sock.Socket access from inside the proxy container, by user mapping:
docker inforeturns 5.7.0--user 65532:655320:0mode 660 inside, and 65532 has no access--userns=keep-id --user <host uid>:<host uid>--user 65532:65532 --group-add keep-groupsThe docker
group_add: [<gid>]advice in D20 does not carry over: with rootless Podman the usable fixes arekeep-id,keep-groups, or running the container as its root.With the
keep-idvariant the proxy spawned apythonisolation container as a sibling (through the socket). The child ran as uid 0 inside its own container, saw no/dataand no socket, and its environment held only the image's own variables. Notes for the docs:-vpaths indocker_isolation.extra_argsare resolved on the host, not inside the proxy container.$HOMEthe proxy loggedmkdir /.local: permission deniedfor its HTTP log; settingHOMEto a writable path fixes that.Dumbris commentedon Oct 21, 2026
Perfect, that matrix is what the docs needed, and the keep-id / keep-groups difference from the Docker group_add advice is exactly the trap people would hit. We will document both routes (host-run and in-container) as community-verified with your notes on -v paths, HOME and the user-owned socket, without a CI job for now.