Skip to content

Make Podman native with optional Docker compatibility - #11032

Closed
acrogenesis wants to merge 56 commits into
quattrofrom
feature/podman
Closed

acrogenesis wants to merge 56 commits into
quattrofrom
feature/podman

Conversation

@acrogenesis

@acrogenesis acrogenesis commented Sep 9, 2026 •

Copy link
Copy Markdown
Member

Make Podman the native container engine on fresh installations and upgrades, with Docker Compose as the default frontend for Compose projects. New development databases use rootless Quadlet user services with persistent named volumes, managed through systemd and inspected in Podman TUI or Podman Desktop. Docker command/API compatibility is optional on fresh installs and retained during Docker upgrades to preserve existing scripts and package dependencies. Windows retains its existing disk and credentials and launches through authenticated rootful Podman and fullscreen RDP.

Changes

  • Install new MySQL, PostgreSQL, MariaDB, Redis, MongoDB and MSSQL databases as Quadlet user services with localhost ports and persistent named volumes. Redis enables append-only persistence. Systemd owns lifecycle; native Podman handles execution without Docker API compatibility. Existing migrated workloads retain their verified configuration.
  • Preserve existing containers, volumes and user definitions during installer preflight. Refuse automatic container replacement and use a per-invocation CID for stop/cleanup, so a failed start cannot delete an unrelated namesake. Skip implicit network-online waits for local database services.
  • Remove podman-docker from the fresh-install defaults. Add Install > Development > Docker Compatibility and omarchy install/remove docker-compat; refuse to replace an installed Docker engine through this optional path. Migration retains the shim for existing Docker providers, preserving dependencies, but leaves native-only systems without the shim or automatic Docker API environment changes.
  • Replace Docker Engine, Buildx, lazydocker and ufw-docker defaults with Podman, Podman TUI and Podman Desktop. Install and retain Docker Compose as the default provider for podman compose and optional docker compose, using Podman's provider precedence and respecting explicit overrides. Keep Podman Compose for the authenticated Windows helper, which invokes it directly with local-engine flags. Super+Shift+D opens Podman TUI; Desktop remains available in the launcher.
  • Start or repair the user API socket before launching Podman TUI. Seed a local connection only when the saved connection list is empty, preserving existing connections and defaults. Respect the preinstalled-app opt-out during migration and remove only the shipped launcher during uninstall.
  • Transfer compatible containers using exact image/writable-layer snapshots. Preserve localhost ports, running/stopped state, restart policies, health checks and supported CPU/memory/PID/shared-memory limits. Copy private volumes with native tar in the destination user namespace and verify contents, ownership, permissions, timestamps, ACLs, xattrs, sparse files and links before application startup.
  • Disable implicit host proxy and host-environment injection. Verify both Podman's inspected environment and the generated OCI process environment, preserving source-configured variables, including proxies. Normalize case and CAP_ prefixes in dropped capabilities from Docker API clients so the destination cannot regain them. Only engine-generated HOME, HOSTNAME, PATH, TERM and container defaults may be added when absent from the source; diagnostics omit environment names and values.
  • Reinspect each Docker source before transfer, before accepting an existing completed destination, and immediately before stopping it. Configuration, network, security or lifecycle changes since batch preflight abort that transfer before mutation. Health-probe observations alone do not block migration. Reject forced shutdowns and recover failures before destination startup. Once startup is attempted, retain the destination and its volumes on errors or interruptions because it may have accepted writes; keep the stale Docker source stopped. Disable completed sources' restart policies and bind receipts to both container identities and the source's stopped lifecycle. Before engine retirement, recheck those receipts/lifecycles and the complete Docker ID/name inventory; new, replaced, renamed or resumed sources keep the migration pending.
  • Pin managed Quadlet volume creation and the packaged user restart service to local Podman even when a developer configures a remote endpoint.
  • Give Podman Desktop a scoped adapter that reuses systemd's API socket and repairs an unlinked socket. Supply Docker SDK clients with a conditional user-manager API environment generator that preserves explicit endpoints and contexts.
  • Preserve Docker's existing boot policy during the quattro transition until migration succeeds. Restore the user runtime environment for sudo-invoked upgrades and check the user manager before changing Docker. Allocate subordinate IDs under a lock, excluding enumerated host users/groups and existing grants; validate both maps before adding either grant, enable user socket/restart services, and swap Docker for its compatibility provider in one package transaction so compatible CLI dependencies remain satisfied. Existing rootful ONCE deployments require an explicit backup/restore migration. A legacy ONCE package or an active/enabled legacy system service blocks migration; the rootless once package alone does not. Fresh rootless ONCE support is described below. Defer the shim during package repair and the 3-to-4 bootstrap while any real Docker provider is installed, including docker-git; every non-shim provider receives workload preflight and transfer before replacement. Failed package-database queries abort instead of being treated as an absent engine.
  • Back up and remove only managed Docker blocks from both IPv4 and IPv6 firewall files; request a reboot to clear transient networking. Hosts without UFW skip its commands; errors from an installed UFW remain fatal. Retain Docker storage for recovery. Companion settings changes preserve active configuration while migration is pending, including alternate engine providers such as docker-git, and retire stock defaults or archive custom files only after engine removal.
  • Force Windows Compose and all direct engine operations to local Podman, so a configured remote endpoint cannot satisfy local VM shutdown/disk-removal checks.
  • Preserve Windows storage, saved credentials and root-owned configuration through verified, pinned mounts. Validate the managed Compose definition and inspected container before granting the Windows exception. Support terminal sudo (including status with captured stdout) and GUI polkit, require a clean handover, block all Windows operations before prompts or disk cleanup while a real Docker provider remains installed (and recheck on authenticated privileged entry), wait for VM/RDP readiness and stop before VM startup if credentials are missing.

Migration scope

ONCE uses the patched source package and rootless user integration below. Existing rootful deployments remain protected; optional Docker CLI compatibility alone is insufficient.

Eligibility follows inspected configuration rather than container names or image labels. Automatic transfers support the default bridge, localhost ports, private local volumes and supported resource/security settings. They remain rootless. Privileged/device workloads, host-directory/socket mounts, custom networks, shared volumes, custom domain names, custom daemon confinement/user mappings and unknown settings require explicit migration.

Destination mounts, devices, capabilities, seccomp, masked/read-only paths, environment and volume metadata are checked before the application runs. Non-root image users receive no capabilities, so workloads relying on later setuid/file-capability elevation need explicit handling. Windows remains the separate authenticated rootful case.

Cached images, unattached volumes, GPU/CDI workloads, Docker-in-Docker and persistent BuildKit are outside automatic transfer. Unsupported workloads keep Docker and leave the migration pending. Completed transfers remain on Podman if a later transfer fails; retained Docker data is a recovery checkpoint. Production services still need application-specific readiness checks. Source reinspection detects stale plans but does not lock out arbitrary concurrent engine changes.

Rootless ONCE

ONCE setup refuses legacy package providers before package changes, and remains retryable from the menu until its user service is enabled.

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 companion packaging PR adds a source-built once v0.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 once package 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.

Validation

  • Docker Compose default (818e428a, docs ba820945): migration/package-repair, optional compatibility and Windows local-engine regressions pass, alongside CLI, manifest/style and syntax/whitespace checks. With user provider configuration and Docker endpoint variables excluded, native podman compose selects Docker Compose, validates config --environment, and creates/starts/executes/removes a disposable rootless container. Acceptance now checks provider identity and environment validation. Fresh ISO validation remains pending podman-tui publication.
  • Application-level socket comparison: an unchanged application installer on rootless Docker in Lab completes and its health checks pass, but its sandbox creation fails on the hardcoded rootful /var/run/docker.sock. Podman also needs a rootless socket-mount adaptation; after that change the same application additionally rejects Podman's advertised API version. A scoped subdirectory-volume probe passes, but complete application compatibility is not established. Both manuals now distinguish client endpoint selection from bind mounts; no global socket remapping, permission weakening or API-version spoofing is introduced.
  • Codex review loop: seven valid findings fixed across four full review rounds. The final independent review reports no valid actionable findings at source 0f3a04eb, settings 57ff1ba, and ISO 54af21c. This review does not replace the pending fresh ISO integration run.
  • Codex review fixes (0f3a04eb, settings 57ff1ba, ISO 54af21c): all Podman shell suites and the full CLI suite pass. New tests cover host/subordinate-ID overlap rejection before changes, both native and optional-compatibility acceptance environments, actual Quadlet-generated local volume commands, and ONCE rejection before package or engine mutations. A scoped live Lab service test starts/stops the local container with CONTAINER_HOST pointing at an unavailable remote socket. Both settings variants build real payloads against current and pinned stable source (four builds), verifying the local restart override is included only when available. All Windows suites pass, including a regression that preserves the local disk when a remote engine has no matching VM. The ISO shell suite and 63 Python tests pass; its migration fixture now tests ONCE refusal separately and uses a harmless Docker-CLI dependency package for provider replacement. No fresh ISO or complete migration was repeated for these review fixes.
  • Native Podman services and optional compatibility (590bacfa): full CLI and focused Quadlet, compatibility, migration, API-environment, menu and script-style tests pass. All six database types started in Omarchy Lab and retained application data across service recreation. Redis, PostgreSQL, MySQL, MongoDB and MSSQL also resumed with their data after reboot; MariaDB remained deliberately masked because it shares MySQL's default port. A real conflicting-name fixture survived failed service startup and cleanup. The optional menu was visually inspected, and the real-engine compatibility guard refused Lab's existing Docker package. Positive install/remove behavior and configured-endpoint preservation have focused stub coverage. This was targeted testing in the existing guest, not a fresh ISO or a repeated full migration.
  • Podman TUI addition (aa9895d1): full CLI and focused launcher, migration, migration-shell, preinstall, Hyprland-default and script-style tests pass. Built and installed package 2.0.0-1.1 with Podman 6.1.1 in Omarchy Lab. Verified the rootless connection, Super+Shift+D, running Redis container view and live logs. The package requires podman>=6. A fresh ISO validation of this addition remains pending package publication to Omarchy's mirror; the earlier ISO evidence below predates it.
  • Earlier runtime (3818fe86): all 18 focused Podman/Windows/quattro suites and CLI pass. New regressions reject pending Windows disk cleanup, restored mixed-case capability drops, unsupported domain names at preflight, alternate-provider bypass, premature retirement, post-start destructive cleanup, missing-UFW failure and terminal status misrouting in the preceding implementations. Environment and batch-drift regressions fail against the preceding implementations.
  • Live targeted checks: real rootless Podman reproduces default host-proxy injection and verifies that the fixed flags prevent it while retaining source-configured proxies, in both inspected and OCI environments. Real Docker start, memory, restart-policy and rename changes are rejected before source mutation. Batch tests additionally cover network, environment, security and lifecycle changes, destination-lookup races and health-only updates.
  • Recovery and retirement checks: a real Docker-to-rootless-Podman fixture preserves data written after startup when receipt storage fails, retains an unreceipted destination on retry, and rejects a restarted source during final completion verification without stopping it. This nested fixture uses VFS storage and disabled cgroup management. Shell regressions cover final inventory changes and optional-UFW handling; real pseudo-terminal descriptors verify terminal/graphical dispatch with mocked elevation.
  • Additional runtime checks: an API-created Docker root process with lowercase CapDrop: [all] migrated through the real helper and retained zero effective/bounding capabilities in Podman inspect and /proc/1/status. Windows handover guards pass full command-dispatch fixtures and real pacman queries against isolated provider metadata.
  • Companion settings (538c25e): 14 scenarios across both recipes pass, including real pacman upgrades/reinstalls with docker-git, provider replacement and no-provider installs. Failed-query cases exercise the actual scriptlet function with a failing pacman stub. Old scriptlets fail the alternate-provider regression. Packaging build-isolation and self-tests CI both pass.
  • Earlier integration coverage: real Redis/PostgreSQL/custom-worker migration, metadata/confinement verification, ONCE package dependency retention (not ONCE application compatibility), stripped session environment, both firewall families and all six reboot assertions passed in disposable guests. Managed Dockurr Windows handover, source-restart/receipt checks, Desktop socket lifecycle and four settings-package payload builds also passed. ISO shell tests and 63 Python tests passed on the unchanged companion source.
  • Earlier packaged image: runtime a128dc1a, settings 28a30ad and ISO 4aecb33 passed a fresh interactive installation, the 92-second graphical/API suite and a separate legacy/custom migration scenario. Windows installation, fullscreen RDP and preserved-disk checks were also completed earlier. This image predates the review fixes; no new full migration/reboot or ISO build was performed for the latest targeted fixes.

Earlier ISO SHA-256: ad7e653117909231e868b1d5c506dafd3299928e4e15310a2ff3f0d15f23e9df. The earlier Lab aggregate passed 239/240 shell files; the unchanged screenshot-sanity blank top-bar assertion failed independently as well. No clean aggregate result is claimed.

Companion PRs

Latest 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. All Podman-focused tests, Quattro upgrade tests and CLI tests pass after merging current Quattro. Missing optional user units warn without aborting the upgrade.

This review cycle did not rerun the full ISO acceptance suite or rebuild ONCE; the earlier real Writebook lifecycle evidence below remains separate.

Screenshots

Windows 11 running fullscreen through the Podman-backed launcher:

Windows 11 fullscreen RDP desktop running with Podman

Podman Desktop showing the migrated Redis and PostgreSQL containers running, with the original Podman test containers deliberately stopped:

Podman Desktop with migrated databases running

The migrated Windows disk still contains the original proof file. This capture predates the fullscreen adjustment shown above. The existing Windows account name is retained during migration; the new-install default is omarchy.

Windows reads its preserved disk marker after migration

Fresh packaged Podman Desktop during the successful API socket lifecycle check:

Podman Desktop in the fresh ISO during the successful socket and Docker API lifecycle test

Podman TUI showing a rootless Redis container in Omarchy Lab

Native Quadlet database services running rootlessly in Podman TUI

Writebook content restored through rootless Podman and ONCE in Omarchy Lab

@acrogenesis
acrogenesis marked this pull request as ready for review September 9, 2026 21:32
@sayem314

Copy link
Copy Markdown

@robosayem review

@robosayem robosayem 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.

@/tmp/review11032.md

@robosayem robosayem 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.

Reviewed the full diff with focus on the migration engine (migrate-databases.py, migrate-windows.py, volume-manifest.py), the updater migration, windows-vm handover, firewall changes, and the environment generator.

The fail-closed posture holds together well end to end: preflight validates every destination name and shared-volume/mount-option blocker before the first docker stop; transfer receipts are bound to the source's stopped-lifecycle identity so a resumed or re-created source invalidates them; recovery paths restore restart policies and restart the source on any failure; the OCI-spec verification after podman init cross-checks caps, mounts, ulimits, resources, and mask sets rather than trusting CLI echoes. Reusing validate_security in the Windows validator with the managed exceptions (CapAdd/Devices/Binds) carved out is a clean pattern. The windows handover closing the default-credentials path and the 0600 root-owned compose both tighten the previous model. Verified the runner invokes migrations under bash -euo pipefail, so the transfer-before-retire ordering in 1788886195.sh aborts cleanly on a mid-flight transfer failure, and ufw --force delete exits 0 on a non-existent rule (returns the error string), so that step cannot wedge a pending migration.

Two nits, neither blocking:

  1. validate_security in migrate-databases.py rejects HostConfig.Init: true and any custom Ulimits as "needs an explicit migration". Both are extremely common in compose files for databases (e.g. init: true on postgres, nofile ulimits on mongo), and both translate directly to Podman (--init, --ulimit name=soft:hard). Worth considering as a follow-up extension so more stock stacks pass the automatic path; the fail-closed default is of course the right call for this first version.

  2. Multi-container runs inspect each container once in main() and carry that snapshot into migrate(). If a container that was stopped at snapshot time gets started by the user mid-run, migrate() stops it, transfers, and records the receipt with its stopped state — the user's start is silently swallowed (data intact, but the destination ends up stopped and the receipt says so). Comparing State.StartedAt against the snapshot just before the stop, or re-inspecting at transfer time, would surface it as an explicit review case instead.

Also checked the d6dc413 follow-up ("Retain Docker defaults until workload migration completes"): re-adding daemon.json (with the pinned bip and bridge-gateway DNS), the resolved stub listener on 172.17.0.1, and the no-block-boot drop-in keeps the daemon deterministic and reachable for the migration window without weakening anything — consistent with the pin-then-migrate design.

Nice work overall — the receipt/identity model and the per-container verification are the strongest parts.

@ErikMelton

Copy link
Copy Markdown
Member

I found two issues with this implementation.

  1. Disable Podman’s implicit proxy-variable injection. migrate-databases creates the destination without --http-proxy=false, so Podman copies the migration process’s proxy variables into the container by default, potentially changing application behavior or exposing credential-bearing proxy URLs to migrated workloads. Consider the original Docker container has:

DATABASE_URL=...

The user running the migration has this in their desktop environment:

HTTPS_PROXY=http://alice:password@proxy.company.example

Podman’s default behavior is to copy host proxy variables into newly created containers. The migration runs essentially:

podman create ... migrated-image

without disabling that behavior. The resulting container can therefore contain:

DATABASE_URL=...
HTTPS_PROXY=http://alice:password@proxy.company.example

even though the Docker source never had HTTPS_PROXY.

The runtime verifier also does not compare environments. TL;DR, Add --http-proxy=false and preferably verify the resulting environment.

  1. Revalidate each source container immediately before migration. Containers are inspected once before the batch starts but migrate() later uses that stale configuration and running state, refreshing only State. A later container can change while an earlier volume is copying; think of a large DB container or something like that. A stopped container started meanwhile becomes a stopped Podman container, while resource, restart, or network changes can be silently lost. Reinspect and compare the full source immediately before stopping it, then migrate from that fresh snapshot.

@omarchybot omarchybot added the enhancement New feature or request label Sep 27, 2026
@greptile-apps

greptile-apps Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[High impact] The PR appears safe to merge; both previous findings are addressed and no new blocking issue was found.

Summary

This PR makes Podman the default container engine, adds persistent development database services, and keeps Docker compatibility optional.

The latest changes address both previous findings:

  • Desktop containers now run on rootless Podman, with databases managed as user services.
  • Docker compatibility is optional on fresh installs and retained during Docker upgrades.
  • Supported Docker containers and private volumes can move into rootless Podman.
  • The Windows VM runs through authenticated rootful Podman and keeps its existing disk.
  • ONCE runs as a user service against the local rootless container engine.

No new actionable issues were found in the changes since the previous review. Tests were inspected, not run.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Launch ONCE] --> B[Start user API unit]
  B --> C{Socket exists?}
  C -->|Yes| F[Check socket type and owner]
  C -->|No, Podman| D[Stop API service]
  D --> E[Restart API socket]
  E --> F
  C -->|No, Docker| X[Exit with error]
  F --> G{Engine is rootless?}
  G -->|Yes| H[Run ONCE with local endpoint]
  G -->|No| X
Loading

Reviews (2) · Last reviewed commit: "Correct the local Windows Compose exampl..." · Reviewed by Greptile

Comment thread default/once/launch.py Resolved
Comment thread docs/podman-migration.md Resolved
@omarchybot omarchybot removed the enhancement New feature or request label Oct 13, 2026
@jandrusk

Copy link
Copy Markdown

This is a substantial product shift (Podman-native + optional Docker compat + Quadlet DB services), not a small fix.

Before code review depth: is Podman-as-default something maintainers want for quattro? If yes, this needs a migration plan for existing Docker installs and a rebase onto current install/menu surfaces. Happy to deep-dive the install path once that's a yes.

@acrogenesis

Copy link
Copy Markdown
Member Author

Thanks for flagging the product decision. This remains the Podman-default proposal for maintainers to compare with #11386 and the opt-in approach in #14077; the choice of default still needs their agreement. The existing-install migration plan and supported/blocked workload boundaries are documented in docs/podman-migration.md.

Updated the branch to current quattro (492b883) through a normal merge at 4751f91, preserving the removal of the legacy sudoless-Docker toggle and the current install/menu surfaces. The CLI and 27 focused configuration, migration, ONCE and Windows suites completed without failures; the separate packaging-checkout check was skipped.

@acrogenesis

Copy link
Copy Markdown
Member Author

Superseded by #16173, maintained from my fork so I can keep its source branch current. The replacement retains all commits from this PR and adds the tested quattro integration and English catalog fixes. Prior discussion, review history and runtime validation evidence remain available here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants