Fedora podman support#2421
Open
skalawag wants to merge 4 commits into
Open
Conversation
- install-node.sh: add dnf/yum branch; Fedora 43+ and RHEL 9+ ship Node 22
natively via dnf
- install-docker.sh: add dnf/yum branch using podman + podman-docker shim
+ docker-compose v2; enable podman.socket; remove podman-compose (lacks
--wait support)
- onecli.ts: auto-create onecli-compose.service on podman/systemd systems
so OneCLI containers survive reboot (podman is daemonless)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The Dockerfile set WORKDIR /workspace/group (introduced in 09c0e81), but container-runner.ts mounts the group directory at /workspace/agent (renamed in 8a12fa6). On Docker/Debian the missing WORKDIR is silently created; Podman rootless fails with CouldntReadCurrentDirectory. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- install-docker.sh: add util-linux-script (script(1) needed for Claude auth) and slirp4netns (required for containers to reach host loopback) - onecli.ts: bind to 127.0.0.1 on Podman; containers reach it via slirp4netns allow_host_loopback - container-runtime.ts: add isPodman(), isSelinuxEnforcing(), selinuxMountSuffix(); update hostGatewayArgs() to use slirp4netns + 10.0.2.2 on Podman; update readonlyMountArgs() to append ,z on SELinux enforcing systems - container-runner.ts: add --userns=keep-id on Podman (rootless UID mapping); apply :z suffix on SELinux enforcing bind mounts; relabel OneCLI CA cert files with chcon before each spawn (OneCLI writes them with user_tmp_t which container_t cannot read under SELinux enforcing) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of Change
.claude/skills/<name>/, no source changes)Description
Adds end-to-end support for installing and running nanoclaw on Fedora (tested
on Fedora 43 and 44) with Podman rootless as the container runtime. No
behavioural change on Debian/Ubuntu + Docker; the existing path is preserved
unchanged when
apt-getandget.docker.comare available.Four logical groups of fixes, one commit each:
1. Installer: detect RPM-based Linux (
setup/install-node.sh,setup/install-docker.sh)install-node.sh: branch onapt-get/dnf/yum. Fedora 43+ and RHEL 9+ship Node 22 natively (
dnf install -y nodejs), so no third-party repo isneeded; the Debian/NodeSource path is unchanged.
install-docker.sh: ondnf/yumsystems, installpodman,podman-docker(provides the/usr/bin/dockershim and setsDOCKER_HOST),and the Fedora
docker-composepackage — which is the real Docker Compose v2Go binary, not the Python
podman-composereimplementation. We explicitlydnf remove podman-composebecause it lacks--waitsupport and breaks theOneCLI installer when present as a weak dep. We also install
util-linux-script(needed by the Claude auth step:script(1)for PTYcapture) and
slirp4netns(see runtime changes below).podman.socketisenabled via
systemctl --user enable --now.2. OneCLI bind host + auto-start (
setup/onecli.ts)so it rejects a missing bind address. Default
ONECLI_BIND_HOST=127.0.0.1when running on Linux with Podman. Containers reach the host on
10.0.2.2via the slirp4netns change below.restart: unless-stoppedin compose has no effectafter reboot. Generate and
systemctl --user enable onecli-compose.serviceso the OneCLI containers come back up after login.3. Dockerfile WORKDIR (
container/Dockerfile)09c0e81introducedWORKDIR /workspace/group. A later refactor (8a12fa6)renamed the bind-mount target in
container-runner.tsfrom/workspace/groupto/workspace/agentbut didn't update the Dockerfile.Docker silently creates a missing WORKDIR; Podman rootless is stricter and
fails at startup with
CouldntReadCurrentDirectory. Aligns Dockerfile to/workspace/agent.4. Container runtime: Podman + SELinux + slirp4netns (
src/container-runtime.ts,src/container-runner.ts)Adds host-introspection helpers and applies their results when constructing
docker runargs. Docker code path is unchanged.isPodman()— caches the result ofdocker versionregex match.isSelinuxEnforcing()— cachesgetenforce == "Enforcing".selinuxMountSuffix()— returns:z(read-write) or,z(added to:ro)to relabel bind-mounted host directories with the shared
container_file_ttype so SELinux enforcement can stay on. Applied to both writable and
readonly mounts.
hostGatewayArgs()— on Podman, returns--network=slirp4netns:allow_host_loopback=true --add-host=host.docker.internal:10.0.2.2. The default pasta network cannotreach the host's loopback from inside the container; slirp4netns can, and
the literal
10.0.2.2is required (host-gatewaydoes not resolve underslirp4netns). On Docker, returns the existing
host-gatewayarg.--userns=keep-idis added on Podman so the host UID is preserved insidethe container; without it
--user $HOST_UID:$HOST_GIDmaps to a sub-UIDthat doesn't own the session files.
--workdir /workspace/agentis now passed explicitly (defensive afterthe Dockerfile fix above).
relabelOnecliCerts()runschcon -t container_file_tagainst the twoOneCLI CA cert files in
/tmpbefore each spawn. OneCLI writes those fileswith
user_tmp_t, whichcontainer_tcannot read, and they are mountedby OneCLI itself so we can't add
:zto the mount spec — relabeling atthe source is the available lever. No-op on non-SELinux systems.
Testing
with only the
install-node.shchange; service survives reboot.completed end-to-end; OneCLI containers come up healthy;
nanoclaw-v2-*service active; both survive reboot.
steps (bootstrap, environment, container, onecli, mounts, service)
completed in 3m51s; Telegram pairing succeeded; first message triggered
container spawn and agent reply; no SELinux AVC denials in
ausearch -m avc; services survive reboot.No regression testing on Debian/Ubuntu was performed in this PR — the changes
are gated on
command -v dnf/isPodman()/isSelinuxEnforcing(), so theexisting Debian + Docker path is byte-identical when those return false.
For Skills