From 579bbc5152f3a6bcd2964080db52d29764013b4e Mon Sep 17 00:00:00 2001 From: elasticdotventures Date: Mon, 3 Aug 2026 12:56:13 +0000 Subject: [PATCH] feat: bake podman/uidmap/fuse-overlayfs into the actions-runner image Adds podman (plus uidmap/fuse-overlayfs, needed for rootless user-namespace + storage-driver support) to the runner image, and a new publish-podman-runner.yml workflow that builds/pushes it to this fork's own GHCR namespace (ghcr.io/promptexecution/actions-runner-podman) independent of upstream's release-branch-driven docker-publish.yml. Built for app4dog#92 (middleware CI's build-image job fails on a self-hosted runner with no docker.sock, docker having been deliberately purged in favor of podman-only). Verified locally: image builds clean, podman --version/info work when run directly; podman run as the runner user inside a container started FROM this image still can't create its own nested rootless user namespace (newuidmap: Operation not permitted, reproduces even with --privileged on the outer container) -- this is a real, empirically-confirmed limitation of nesting rootless user-namespace creation two levels deep, not a missing capability flag. The intended consumption model is therefore host-podman-socket passthrough (CONTAINER_HOST pointing at a mounted host podman.sock) rather than this image's own podman creating a third nested namespace layer -- see the b00t-cli gh-runner tooling change that wires this up. --- .github/workflows/publish-podman-runner.yml | 58 +++++++++++++++++++++ images/Dockerfile | 9 ++++ 2 files changed, 67 insertions(+) create mode 100644 .github/workflows/publish-podman-runner.yml diff --git a/.github/workflows/publish-podman-runner.yml b/.github/workflows/publish-podman-runner.yml new file mode 100644 index 00000000000..5621c4ae8e5 --- /dev/null +++ b/.github/workflows/publish-podman-runner.yml @@ -0,0 +1,58 @@ +name: Publish podman-enabled actions-runner image + +# PromptExecution fork addition: builds images/Dockerfile (upstream actions/runner +# image + podman/uidmap/fuse-overlayfs baked in) and pushes it to this fork's own +# GHCR namespace. Not the upstream release-branch-driven docker-publish.yml -- +# this just tracks main directly on our own image tag. + +on: + push: + branches: [main] + paths: + - images/Dockerfile + - .github/workflows/publish-podman-runner.yml + workflow_dispatch: + inputs: + runner_version: + description: "actions/runner release version to bundle (no leading v)" + required: true + default: "2.336.0" + +jobs: + publish-image: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository_owner }}/actions-runner-podman + RUNNER_VERSION: ${{ github.event.inputs.runner_version || '2.336.0' }} + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Docker buildx + uses: docker/setup-buildx-action@v3 + + - name: Log into registry ${{ env.REGISTRY }} + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push image + uses: docker/build-push-action@v6 + with: + context: ./images + platforms: linux/amd64 + tags: | + ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest + ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:runner-${{ env.RUNNER_VERSION }} + build-args: | + RUNNER_VERSION=${{ env.RUNNER_VERSION }} + push: true + labels: | + org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }} + org.opencontainers.image.description=actions/runner ${{ env.RUNNER_VERSION }} with podman/uidmap/fuse-overlayfs baked in for rootless self-hosted podman-based CI diff --git a/images/Dockerfile b/images/Dockerfile index 426e3342b6d..b1c3c4af8ce 100644 --- a/images/Dockerfile +++ b/images/Dockerfile @@ -54,6 +54,15 @@ RUN add-apt-repository ppa:git-core/ppa \ && apt install -y git \ && rm -rf /var/lib/apt/lists/* +# PromptExecution fork addition: bake in podman so CI jobs on this runner +# don't need to self-install it per-run. Ubuntu 24.04 (noble) ships podman +# in the default repos, no PPA needed (unlike git above). uidmap/fuse-overlayfs +# are needed for rootless podman's user-namespace + storage-driver fallback, +# since this runs as non-root "runner" inside an already-rootless podman pod. +RUN apt update -y \ + && apt install -y --no-install-recommends podman uidmap fuse-overlayfs \ + && rm -rf /var/lib/apt/lists/* + RUN adduser --disabled-password --gecos "" --uid 1001 runner \ && groupadd docker --gid 123 \ && usermod -aG sudo runner \