Skip to content

Add rootless podman image - #339

Merged
bpmct merged 3 commits into
mainfrom
add-podman-image
Aug 20, 2026
Merged

Add rootless podman image#339
bpmct merged 3 commits into
mainfrom
add-podman-image

Conversation

@bpmct

@bpmct bpmct commented Aug 20, 2026

Copy link
Copy Markdown
Member

The rootless Podman docs (and a bunch of templates in the wild) reference ghcr.io/coder/podman, but its Dockerfile lives in the now-archived community-templates repo, so the image is published-but-orphaned. This gives it a maintained home here, published as codercom/example-podman:ubuntu (+ enterprise- alias) like the rest.

Changes from the archived version:

  • Wraps enterprise-base like our other images instead of raw ubuntu:22.04, so the standard coder user (uid 1000) gets the subuid/subgid ranges rather than a separate podman user
  • Installs podman/crun/fuse-overlayfs from Ubuntu's own repositories instead of the OpenSUSE kubic unstable repo
  • Trimmed storage.conf to the settings we actually override

Also includes an unrelated CI fix: images/node was broken by apt-key being removed from the resolute base image, which has failed every build on main since Aug 10 (including scheduled rebuilds). The Yarn repo is now trusted via a signed-by keyring instead. Bundled here since CI can't pass without it.

Verified the setup end-to-end on an EKS cluster with the recipe from coder/coder#28100: rootless podman run hello-world works as uid 1000, unprivileged, fuse-overlayfs driver. Follow-up: point the docker-in-workspaces docs at this image once it publishes.

Created with AI assistance (Coder Agents) on my behalf.

Ports the podman image from the archived community-templates repo so it
has a maintained home. Installs podman from Ubuntu's own repositories
instead of the kubic unstable repo, and grants subuid/subgid ranges to
the standard coder user instead of a separate podman user.
apt-key was removed from the resolute base image, which has failed every
build since Aug 10 (including scheduled rebuilds on main). Trust the
Yarn repository via a signed-by keyring instead. Verified locally:
node v24.19.0, yarn 1.22.22.
@bpmct
bpmct requested a review from nickvigilante August 20, 2026 21:31

@nickvigilante nickvigilante left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving. The design is sound and consistent with the repo's conventions, and CI is green (images/ubuntu + quick). Everything below is non-blocking.

Looks good

  • Wrapping enterprise-base so the standard uid-1000 coder user gets the subuid/subgid ranges is the right call, and build_images.sh/push_images.sh will publish codercom/example-podman (primary) + codercom/enterprise-podman (alias) with the dated/version tags like every other image.
  • Installing podman/crun/fuse-overlayfs from Ubuntu's own repos instead of the kubic unstable repo is a real maintainability win.
  • /var/lib/shared read-only stores and the fuse-overlayfs mount_program are set up correctly.

Non-blocking follow-ups

  1. Document the writable-storage expectation for graphroot/runroot (inline on storage.conf) so the image is usable outside the paired coder/coder#28100 template.
  2. The node Yarn fix is unrelated scope — consider splitting or noting it (inline).
  3. _CONTAINERS_USERNS_CONFIGURED="" looks like a no-op — drop or comment (inline).

Minor nits

  • README badge differs from the sibling READMEs (DockerPulls vs Docker Pulls, missing ?label=); since Podman is brand new you could point it at example-podman per the top-level README's recommendation.
  • slirp4netns isn't exercised with netns="host" (resolute defaults to pasta) — harmless fallback.
  • cgroups="disabled" means no per-container resource limits or podman stats — worth a README line.

Note: PR CI builds but doesn't run or push the image, so green means "builds on resolute," not "rootless run verified" — that rests on the EKS test, which is good enough here.

Review drafted with AI assistance (Coder Agents).

Comment thread images/podman/README.md Outdated

## How To Use

See

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
See
Visit

Comment on lines +10 to +13
runroot = "/run/containers/storage"

# Primary read/write location of container storage
graphroot = "/var/lib/containers/storage"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking question: runroot (/run/containers/storage) and graphroot (/var/lib/containers/storage) sit under root-owned paths, and the image ends as USER coder (uid 1000) without creating/chowning them. Does rootless Podman here rely on the workspace mounting writable volumes at those paths (as the coder/coder#28100 template does)? If so, a one-line note in the README would help anyone using the image on its own. The /var/lib/shared read-only stores look correctly handled.

From Coder Agents 🤖

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question — neither, actually: rootless Podman ignores runroot/graphroot (those are rootful paths) and stores under ~/.local/share/containers/storage, which lands on the workspace home volume. That's why the verified runs worked with no extra mounts. Added a note to both storage.conf and the README.

(posted via Coder Agents on my behalf)

Comment on lines +11 to +15
# Install Yarn. apt-key was removed from modern Ubuntu releases, so trust
# the Yarn repository via a signed-by keyring instead.
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor -o /usr/share/keyrings/yarnkey.gpg && \
echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
DEBIAN_FRONTEND="noninteractive" apt-get update && apt-get install -y yarn

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated to the Podman image (Yarn keyring fix). It's correct and probably necessary now that apt-key is gone on resolute — but it's invisible in the PR title/body. Worth splitting into its own small PR (would unblock main on its own) or at least calling it out in the description.

From Coder Agents 🤖

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Called it out in the description instead of splitting — main is red either way and this unblocks it in one go.

(posted via Coder Agents on my behalf)

Comment thread images/podman/ubuntu.Dockerfile Outdated
/var/lib/shared/vfs-images/images.lock \
/var/lib/shared/vfs-layers/layers.lock

ENV _CONTAINERS_USERNS_CONFIGURED=""

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ENV _CONTAINERS_USERNS_CONFIGURED="" looks like a no-op — Podman sets this internally after it re-execs into a user namespace and gates on a non-empty value, so an empty string reads the same as unset (and ENV foo="" doesn't unset an inherited value either). Fine to drop it, or add a comment if it's intentionally mirroring the archived image.

From Coder Agents 🤖

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, it's a no-op carried over from the archived image — dropped.

(posted via Coder Agents on my behalf)

@nickvigilante nickvigilante left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Coder Agents found a few things, and I'm refactoring my PR based on this.

nickvigilante added a commit to coder/coder that referenced this pull request Aug 20, 2026
…recation and EKS Auto Mode (DOCS-645)

Addresses review feedback on #28100:
- Swap ghcr.io/coder/podman for the maintained codercom/example-podman
  image and link its source (coder/images#339).
- Note that the AppArmor annotation is deprecated on Kubernetes 1.30+.
- Add an EKS Auto Mode caveat to the Bottlerocket section.
nickvigilante added a commit to coder/coder that referenced this pull request Aug 20, 2026
…CS-645)

The tree/main/images/podman path 404s until coder/images#339 merges,
which fails the docs linkspector (check-docs) job. Link the repo root,
which stays valid regardless of merge order.
- Drop the no-op _CONTAINERS_USERNS_CONFIGURED env (Podman sets it
  internally after re-exec; an empty value reads the same as unset)
- Document that runroot/graphroot are rootful-only and rootless storage
  lands on the home volume
- README wording: See -> Visit
@bpmct
bpmct merged commit 51cfd28 into main Aug 20, 2026
2 checks passed
@bpmct
bpmct deleted the add-podman-image branch August 20, 2026 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants