Repository navigation
Run development containers with rootless Docker - #11386
acrogenesis wants to merge 40 commits into
Conversation
|
Now that the user is no longer a member of the With the current defaults Testcontainers can't even start. This saves everyone the manual tweaking. |
|
@acrogenesis While working out the details of this solutions, please also consider this use-case for an even better out-of-the-box experience: |
|
dont waste any effort on docker just switch to podman see #11032 |
[High impact] No new blocking issue was established; the acknowledged packaging prerequisite still needs to land before merging. SummaryMoves development containers to per-user rootless Docker while keeping Windows on an authenticated rootful daemon.
|
|
Thanks for linking #14077. It offers the smaller opt-in approach alongside the system daemon; this PR remains the automatic-migration alternative for comparison with that proposal and #11032. Maintainers still need to choose the direction. Resolved the current quattro conflicts through a normal merge at a6bb877, retaining the reviewed migration safeguards and intentional removal of the legacy sudoless-Docker toggle. The CLI and 13 focused configuration, migration, ONCE and Windows suites completed without failures; the separate packaging-checkout check was skipped. |
|
Updated the existing branch to current quattro. Preserved legacy Windows credentials with the newer escaped-password fixture, and moved architecture stubbing before authentication/credential checks. A simulated ARM host fails on the old test and passes on the updated test; focused migration, failure-recovery, Windows, posture, configuration and CLI checks pass with the paired settings proposal. Full native CI checks the official package base and currently fails its configuration check for the rootless environment generator, authenticated system socket drop-in and optional ONCE unit. The existing omacom/omarchy-pkgs#369 now ships these conditionally for the selected source and verifies protected helper ownership/modes. The separate docker-rootless-extras runtime prerequisite is outside that settings-only change. Maintainer selection of the container approach remains open. |
|
why cant we stop wasting time on docker and just switch to podman ? |
Omarchy currently keeps ordinary users away from the root-equivalent system Docker socket, which leaves development Docker behind repeated privilege prompts. This proposal runs development workloads in Docker's per-user rootless daemon while preserving the Docker CLI and API, Compose, Buildx, lazydocker, images, and the existing
d='docker'alias. It is a direct-Docker alternative to #11032 for side-by-side review.Fresh installs allocate nonoverlapping subordinate UID/GID ranges after checking every resolvable account and both subordinate-ID databases. Omarchy then prepares the account-owned daemon configuration, enables only that initialized user's service, and selects
$XDG_RUNTIME_DIR/docker.sockthrough a marker-gated systemd environment generator. The daemon runs with a fixed packagedPATH, fixed configuration root, bounded JSON logs, private cgroups, seccomp, and verified RootlessKit/dockerd arguments.Existing installs receive an automatic, batch-preflighted migration from the system daemon. Compatible containers retain their writable layer, exact application configuration, supported limits, localhost ports, restart policy, capability ceiling, and private named-volume contents and metadata. The migration fails closed before stopping anything when it cannot reproduce a workload safely, including privileged mode, added capabilities, host paths, devices, shared volumes, custom networking/runtime/confinement/logging, or unknown nondefault host settings.
The cutover is journaled and crash-replayable. Omarchy quiesces the complete batch before revoking connected rootful clients, seals source volumes, transfers committed images by identity, pins destination volumes with an inert never-started guard, forces copied filesystems to stable storage, and keeps a durable Docker event window that rejects even transient foreign mounts. Runtime verification and receipt publication bind the exact source and destination snapshots. Failures before the first destination start restore the source and remove only proven-owned artifacts; once a destination start may have occurred, both copies remain stopped for explicit inspection. Successful rootful copies remain stopped with restart disabled as recovery data.
Windows stays on a separate rootful Docker daemon because KVM, TUN, and
NET_ADMINrequire that boundary./run/docker.sockbecomesroot:rootmode0600; the Windows command pins the socket and protected host paths, keeps Compose and credentials root-only, preserves lifecycle across reconciliation, and authenticates every terminal or graphical operation throughsudoorpkexec.Packaging prerequisite: omarchy-pkgs#405 was closed unmerged. The required environment generator, rootful socket drop-in and ONCE user unit are still missing from upstream settings; this proposal is not ready to merge until those payloads are integrated.
Rootless ONCE
ONCE setup refuses legacy package providers before package changes, and remains retryable from the menu until its user service is enabled. Installation and launch require the account’s rootless Docker setup marker before installing ONCE or starting the daemon.
ONCE now runs as a user service against the local rootless engine, with a loopback-only proxy on HTTP 8080 / HTTPS 8443. The launcher clears remote Docker overrides, verifies rootless operation, requires the patched ONCE build, disables binary self-update, and keeps backups private. One-time package/lingering setup can require administrator access; ONCE and its applications run without sudo.
The earlier companion packaging proposal adds a source-built
oncev0.3.2-omarchy1. Real Writebook testing found two Podman restore incompatibilities that reported success without restored content: archive entry prefixes and extraction through an unstarted temporary container's root filesystem. The patch normalizes backup paths, restores directly into the volume, rejects malformed legacy archives, and waits for final exec status. Rootless proxy settings are opt-in, preserving legacy rootful defaults outside the launcher.Existing rootful ONCE deployments still need explicit, verified backup/restore migration. A legacy ONCE package or an active/enabled legacy system service keeps generic engine migration pending; the rootless
oncepackage alone does not. An active/enabled legacy manager stops the optional installer before package/service changes. The new installer does not adopt or delete old application data. Public hosting/automatic public HTTPS are outside this local desktop integration.Validation: built and installed the exact source package in Omarchy Lab; upstream internal Go suite and new archive/exec/proxy regressions pass. Writebook creation, authenticated content and credential preservation through backup/restore, stop/start, container replacement, actual scheduled update/backup checks and reboot pass on each engine. Verified user-owned background processes, mode-0600 backups, loopback listeners and unchanged host privileged-port restrictions. New launcher/installer guards, focused migration/posture tests and CLI pass. Four real settings payload builds verify both variants on both proposals. This is targeted Lab validation, not a fresh ISO run or a new independent review loop.
Earlier Lab validation
8f42fad8: callreset-failedonly when the user Docker service is failed. New behavioral coverage rejects the previous implementation, verifies fresh/inactive, failed and active states, and preserves fatal reset/enable/start failures. Posture/migration suites and full CLI pass. A disposable real systemd service in Lab reproduces the original unloaded-unit error, passes first-start and failed-state recovery with the new setup block, and preserves its invocation when active; the running Docker workload was not restarted.c32e98f6. On rootless Docker29.7.2/API1.55 with Compose5.5.1 in Lab, an unchanged application installer exits successfully and web/API checks return200, but actual sandbox creation failsconnect EACCES /var/run/docker.sock. The app mounted the restricted rootful socket instead of the per-user socket. This rootless transition cost applies to both engine proposals; preserving Docker's API does not rewrite hardcoded mounts or establish application compatibility. No application edits or socket permission changes were used for this comparison.c00141edand matching required package/helper payloads, followed by the scoped service-setup regression above. It is not a fresh ISO or a repeated complete migration on the final head. The earlier review verdicts below apply to their recorded commits.Validation
c52a6e315824ed123d8b1babbb0049d65bab9d30retains the normal merge ofquattro573b518be. CLI (125 checks), upgrade, posture and Windows suites pass. Windows checks that need no mounts execute before the namespace gate and pass with namespaces unavailable.Earlier validation:
./test/cliquattrodocker-rootless-extrasbuild and generated-service inspectionEarlier focused validation
Independent Claude Fable 5.1 and Codex review cycles completed; final followups report no actionable findings.
Windows setup stages private credentials before writing the privileged Compose definition and preserves existing credentials on failure. Removal deletes credentials and private staging files left by interrupted installs through linked config directories, without following file symlinks, and reports cleanup errors. Legacy Compose file symlinks are rejected before migration, preserving their targets for explicit handling. Nine isolated lifecycle regressions pass on each proposal.
ONCE provider and legacy-service migration guards, installer refusal before changes, and menu retry behavior pass regression tests. The menu retry and uninitialized-account refusals were also checked in Omarchy Lab without restarting the running ONCE workload. Windows compose, authorization and mount-boundary tests pass, including linked user config with no VM, authorized root-config repair, and private credential writes. The authorization test now isolates HOME. Rootless migration/posture and CLI checks pass.
This review cycle did not rerun the full ISO acceptance suite or rebuild ONCE; the earlier real Writebook lifecycle evidence below remains separate.
Screenshots
The first capture shows migrated containers, Docker images, private volumes, and the stock Docker network in lazydocker. The second shows the active rootless daemon and per-user store after reboot while the desktop user remains denied access to the rootful Windows socket.