Repository navigation
feat(droopy4096/podman-setup): add Podman setup module - #1228
Draft
coder[bot] wants to merge 5 commits into
Draft
coder[bot] wants to merge 5 commits into
coder[bot] wants to merge 5 commits into
Conversation
Configures rootless Podman for non-privileged workspaces: native overlay storage, an optional Docker-compatible API socket, and DOCKER_HOST/DOCKER_BUILDKIT env vars.
Contributor
Module Scorecard Check
|
| Presentation & Onboarding | Credential Hygiene | Restricted-Environment Readiness | Engineering Quality | Overall |
|---|---|---|---|---|
| 12 / 17 | 16 / 20 | 1 / 2 (18 pts N/A) | 10 / 10 | 81 / 100 |
Drilldown
Track: Utility (configures rootless Podman in a workspace image; not an IDE or AI agent tool)
Presentation & Onboarding — 12 / 17
| Criterion | Max | Score | Notes |
|---|---|---|---|
| Configuration-mode examples | 12 | 12 | README provides a default Kubernetes pod example, a "Podman CLI only" example (socket = false, disable_buildkit = false), and a required_tools example, each with sensible defaults. Major option surfaces (socket vs. CLI-only, required tools, docker shim behavior) are all documented. |
| Visual preview | 5 | 0 | No image, GIF, or video anywhere in the README. |
Credential Hygiene — 16 / 20
| Criterion | Max | Score | Notes |
|---|---|---|---|
| Secrets marked sensitive | 16 | 16 | Module has no secret/credential inputs at all; no inline keys appear anywhere in README examples. Nothing to leak. |
| Non-hardcoded auth path | 4 | 0 | Module has no auth concept (no API keys, no IAM/ServiceAccount flow), and no such path is documented. Per rubric, missing support outside if-applicable criteria scores zero. |
Restricted-Environment Readiness — 1 / 2 (18 pts N/A)
| Criterion | Max | Score | Notes |
|---|---|---|---|
| Mirrorable artifact source | 5 | N/A | README states "It installs nothing." No download/install URL exists to override. Excluded per "download-related criteria go N/A when the module installs nothing of its own." |
| Bring-your-own binary | 10 | N/A | Same reasoning — the module never downloads or installs the tool; it only configures Podman already present in the image. Concern doesn't exist by construction. |
| Egress transparency | 3 | N/A | Module makes no external network calls of its own (only operates on the local Unix socket and local config files). Explicitly listed as N/A-eligible when nothing is downloaded. |
| Runs without sudo | 2 | 1 | install.sh.tftpl only invokes sudo for the optional docker-shim symlink when /usr/local/bin isn't writable, and falls back to ~/.local/bin/docker without sudo if sudo -n fails. Core functionality (storage.conf, env vars, tool checks) never requires sudo. Optional feature + working non-root fallback = half credit. |
Engineering Quality — 10 / 10
| Criterion | Max | Score | Notes |
|---|---|---|---|
| Input quality | 6 | 6 | All 8 variables (agent_id, native_overlay, socket, socket_path, disable_buildkit, docker_shim, required_tools, icon) have clear descriptions and sensible defaults. validation blocks enforce socket_path is absolute and required_tools entries are plain command names (no shell injection). |
| Test coverage | 4 | 4 | podman-setup.tftest.hcl covers defaults, socket toggling, buildkit toggling, custom socket path, and validation failure cases (business logic). main.test.ts runs real container-based end-to-end tests covering overlay config, user-managed storage.conf preservation, missing-tool failures, docker shim linking/fallback, and docker_shim = false behavior. |
Overall — 81 / 100
Raw 38 / 47 → round(38 / 47 × 100) = 81
Tip
You can run this locally by telling your agent: "review this module against .github/scorecard/SCORECARD.md".
Scored against SCORECARD.md with solstice-1. Language-model scores are advisory.
New extra_tools input (default buildah and skopeo). Missing tools are installed with apt, dnf, microdnf, yum, apk or zypper when the install script runs as root or has passwordless sudo; otherwise it warns and Podman setup continues.
…ly check tools The module configures the Podman the image provides, so it is now podman-setup. It no longer installs Buildah or Skopeo: required_tools lists commands the image must provide besides podman, and the install script fails with one error naming every missing tool and its package. No sudo or network access.
…as no docker CLI New docker_shim variable (default true). Links /usr/local/bin/docker (directly or with passwordless sudo, else ~/.local/bin/docker) to podman; keeps an existing docker CLI, which reaches Podman through DOCKER_HOST.
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.
Description
Adds
droopy4096/podman-setup: configures the rootless Podman that the workspace image provides, for non-privileged Kubernetes workspaces (no Sysbox, no privileged pod), following the setup proven in coder/dogfood#732. It installs nothing; Podman and the rootless prerequisites belong to the image.podmanand every command inrequired_tools(for example["buildah", "skopeo"]) are in the image. If any are missing, the install script fails with one error that lists them and the package to add on Debian/Ubuntu, Fedora/UBI and Alpine.native_overlay(default on): writes~/.config/containers/storage.confwith kernel overlayfs (mount_program = ""), overriding images that pin fuse-overlayfs. A user-managed file is left alone.socket(default on): runspodman system serviceonsocket_path(/tmp/podman.sock) and setsDOCKER_HOST, so Docker clients, Testcontainers and Dev Containers tooling work.disable_buildkit(default on): setsDOCKER_BUILDKIT=0for the Docker CLI against Podman.docker_shim(default on): when the image has nodockercommand, linksdockertopodmanin/usr/local/bin(directly or with passwordlesssudo), falling back to~/.local/binwith a warning if that isn't onPATH. An existing docker CLI is kept and talks to Podman throughDOCKER_HOST. Notes whendocker composehas no provider (docker-compose/podman-compose).fs_group_change_policy = "OnRootMismatch"), required tools, and air-gapped use.Renamed from
podman-rootlessduring review: the module sets up what the image ships rather than providing Podman. An earlier revision installed Buildah and Skopeo at runtime; that was dropped so tools come from the image like Podman does, and the module never installs packages or needs network access.Type of Change
Module Information
Path:
registry/droopy4096/modules/podman-setupNew version:
v1.0.0Breaking change: [ ] Yes [x] No
Testing & Validation
terraform test: 7 passedbun test: 10 passed (container tests with stubbed tools: native overlay config, user-managedstorage.confleft alone, missingpodman, all missingrequired_toolslisted in one error with nothing configured, required tools present, Buildah/Skopeo optional by default, docker linked via sudo,~/.local/binfallback without sudo, existing docker CLI kept,docker_shim = false)bun fmt),scripts/terraform_validate.sh,readmevalidation, shellcheck on the rendered install scriptcoderincodercom/example-podman:ubuntu: withrequired_tools = ["buildah", "skopeo"]it failed listing both (that image ships neither) and passed the check once they were installed. Rootlesspodman infoitself could not run in that nested test container (newuidmapnot permitted), which is an environment limit, not the module.codercom/example-podman:ubuntu: the published image already ships a real docker CLI (29.x), which is kept; with/usr/bin/dockerremoved, the script linked/usr/local/bin/docker -> /usr/bin/podmananddocker --versionran Podman 5.7.codercom/example-podman:ubuntu(coder/dogfood#773)Related Issues
coder/dogfood#732
Created on behalf of @droopy4096