User Story
As an operator running sandboxes via the Podman driver, I want DNS resolution to work the same way it does with Docker, so sandboxed processes can resolve policy-permitted hostnames without a manual workaround.
Problem Statement
Podman workload containers run with NetworkMode: none (per RFC 0012's isolation model), and Podman does not manage DNS for network-less containers at all — /etc/resolv.conf is left exactly as whatever the base image happens to ship. The Docker driver, by contrast, explicitly configures nameserver 127.0.0.53 in the workload's /etc/resolv.conf, which the sandbox's DNS mediation (network_broker.rs's classify_send) specifically relays only when the destination matches that exact relay address. Podman workloads get no equivalent configuration.
Impact / Why This Matters
Confirmed independently twice:
Any real-world Podman deployment using a base image that doesn't already happen to ship the 127.0.0.53 convention will silently fail DNS resolution for every sandboxed process — including for hostnames the policy explicitly allows — with a generic DNS lookup error rather than any actionable diagnostic pointing at the real cause.
Acceptance Criteria
Reproduction Steps
- Create a Podman-driven sandbox from an image with no
nameserver 127.0.0.53 baked into /etc/resolv.conf (e.g. ghcr.io/astral-sh/uv:python3.12-bookworm-slim).
- Apply a policy allowing a specific hostname (
openshell policy update --wait --binary <bin> --add-endpoint <host>:443:read-only <sandbox>).
- Attempt to resolve that hostname inside the sandbox (
getent hosts <host>).
- Resolution fails with a DNS error, even though the host is explicitly policy-permitted.
Environment
Related: #3396, PR #3642 (follow-ups section)
User Story
As an operator running sandboxes via the Podman driver, I want DNS resolution to work the same way it does with Docker, so sandboxed processes can resolve policy-permitted hostnames without a manual workaround.
Problem Statement
Podman workload containers run with
NetworkMode: none(per RFC 0012's isolation model), and Podman does not manage DNS for network-less containers at all —/etc/resolv.confis left exactly as whatever the base image happens to ship. The Docker driver, by contrast, explicitly configuresnameserver 127.0.0.53in the workload's/etc/resolv.conf, which the sandbox's DNS mediation (network_broker.rs'sclassify_send) specifically relays only when the destination matches that exact relay address. Podman workloads get no equivalent configuration.Impact / Why This Matters
Confirmed independently twice:
ghcr.io/astral-sh/uv:python3.12-bookworm-slim(nosystemd-resolvedconvention baked in) — required building a custom local image with/etc/resolv.confhand-baked viaCOPYto get DNS interception working at all.NetworkMode: noneand gets no/etc/resolv.conf, while the Docker driver setsnameserver 127.0.0.53. I wrote that line into the workload's/etc/resolv.confby hand."Any real-world Podman deployment using a base image that doesn't already happen to ship the
127.0.0.53convention will silently fail DNS resolution for every sandboxed process — including for hostnames the policy explicitly allows — with a generic DNS lookup error rather than any actionable diagnostic pointing at the real cause.Acceptance Criteria
/etc/resolv.conf(pointing at the sandbox's internal DNS relay address) into the workload container at creation time, matching Docker's behavior, regardless of what the base image shipsnetwork: noneskips that entirelyReproduction Steps
nameserver 127.0.0.53baked into/etc/resolv.conf(e.g.ghcr.io/astral-sh/uv:python3.12-bookworm-slim).openshell policy update --wait --binary <bin> --add-endpoint <host>:443:read-only <sandbox>).getent hosts <host>).Environment
main(post RFC 0012, post PR fix(sandbox): keep boundary connection live under stalled relays #3642)Related: #3396, PR #3642 (follow-ups section)