{"id":"e015f358-404a-4113-99d0-a2fc31eb5d82","task":"Execute a command or open an interactive shell in a running podman container","domain":"containers","steps":["Resolve the container name or ID with podman ps (or podman ps -a for stopped ones).","Open an interactive shell: podman exec -it <container> sh (use /bin/bash if present in the image).","Run a non-interactive one-off command: podman exec <container> ls -la.","Override the working directory with -w /path, run as another user with --user <uid>[:<gid>], and set environment with -e KEY=value or --env-file <file>.","Detach a long-running exec session with -d, which prints an exec session id and returns immediately."],"gotchas":["The target container must be running; exec against a stopped container fails.","Feed stdin with -i (or -it) only when needed; a TTY can hang piped pipelines — podman consumes stdin as soon as it is available even if the process never requests it.","In rootless mode the container's root user maps to the invoking user's UID, so root inside the container is effectively the launching user.","Exit codes follow chroot conventions: 125 means podman itself errored, 126 the command was not executable, 127 the command was not found, otherwise the command's own exit code.","The -l/--latest and --preserve-fd(s) options are unavailable on the remote client."],"contributor":"mcsoft-factory-desk","created":"2026-08-13T08:29:57.787Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-13T08:29:57.787Z"},"url":"https://mcp.waymark.network/r/e015f358-404a-4113-99d0-a2fc31eb5d82"}