Repository navigation
feat(run-spaceapp): support rootless Podman as a container engine (#63) - #1
Merged
Merged
Conversation
Docker stays the default. --engine podman, and a ready Podman 5 when Docker is absent, persists the engine and runs lifecycle commands through podman compose. Workspace mounts get SELinux :z and keep-id so uid 10001 maps to the host user; the CLI service drops no-new-privileges so gosu can still switch to that uid. Host-root and in-place engine switches are refused. Signed-off-by: Dayton Allen <daytonballen@gmail.com> Co-authored-by: dayton536 <dayton536@users.noreply.github.com>
The runtime Dockerfile already packs undici 6.29.1. The public distribution test still expected 6.28.1, so the public suite failed on main. Signed-off-by: Dayton Allen <daytonballen@gmail.com> Co-authored-by: dayton536 <dayton536@users.noreply.github.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.
Fixes oll4com#63
Problem and user impact
run-spaceappcould only install and operate SpaceApp through Docker. People on Fedora, RHEL, and other hosts that ship rootless Podman, and people who will not run a root Docker daemon, could not install SpaceApp at all.Change
Docker stays the default. Nothing changes for an existing Docker installation.
install --engine docker|podman(and"engine"in--answers) is saved inconfig.jsonand used by later lifecycle commands:up,down,status,logs,update,rollback,backup,restore,doctor,repair,uninstall,provider install,credentials,owner, andworkspace.podman composeis ready, an interactive install asks before using it.--non-interactiveselects it. Podman 4.x is rejected. Windows Podman is refused; Linux rootless and macOS Podman machine are the supported paths.depends_onhealth conditions,init,mem_limit/cpus, shared socket volumes,--waiton the checkpoint database, andexec/run --user 10001:10001). The command ispodman compose(Docker Compose v2 or podman-compose).bind.selinux: z.spaceapp-cli(and per-user CLI services) setuserns_mode: keep-id:uid=10001,gid=10001so container UID 10001 is the host user. Those services omitno-new-privilegesbecause the image entrypoint usesgosuto drop from root to UID 10001, andno-new-privilegesmakes that switch fail with "operation not permitted". Other services keepno-new-privileges.podman machine inspectCPU, memory, and disk with the selected profile and prints apodman machine setcommand that only grows the disk.doctorandsupport-bundlereport the engine, version, rootless or rootful mode, cgroup version, and whether thecpuandmemorycontrollers are delegated.uninstall --purge-dataremoves volumes but keepsconfig.jsonandbackups/. Same-root migration deletes onlyconfig.json. A new home needs the backup directory copied in, and the old runtime stopped first so port127.0.0.1:4911is free. Backups omit browser profiles,google-oauth.json, and Telegram secrets..github/workflows/platform-matrix.ymlgains arootless-podmanjob onubuntu-latestthat requires Podman 5, a rootlesspodman info, a Compose provider, a realpodman run, and the launcher suite.Verification
Signed-off-by:line (Developer Certificate of Origin 1.1), and the contribution is licensed under the MIT License (see CONTRIBUTING.md).Commands run in this environment:
npm test -w run-spaceapp— 219 passed, 0 failednpm run check -w run-spaceapp— passednpm run verify:export-provenance— ok, 4948 files, 422 sanitized, 0 problemsnode --test scripts/tests/verify-export-provenance.test.mjs— 3 passedThe edited docs and provenance script are public-repository files, so
PUBLIC_EXPORT_MANIFEST.jsondid not need a new hash. Provenance still reports 0 problems.Security, migration, and rollback
Named volumes are not shared between Docker and Podman, so an in-place engine change is refused.
--access host-rootstays Linux + Docker only. Droppingno-new-privilegesis limited to the Podman CLI service sogosucan drop to UID 10001; the entrypoint still switches user before the CLI host runs. SetSPACEAPP_HOMEbefore migration commands. The launcher has no--rootflag; an unsetSPACEAPP_HOMEwould make$SPACEAPP_HOME/config.jsonexpand to/config.json.