You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(start-keycloak): fallback to podman when docker is not installed - #1078
Add getContainerRuntime() in src/bin/start-keycloak/getContainerRuntime.ts to detect docker first (preserving podman-docker shim support) and fall back to podman when docker is not installed.
Update start-keycloak, getRealmConfig / dumpContainerConfig, and scripts/dump-keycloak-realm.ts to use the detected container runtime instead of hardcoding docker.
Tailor missing-runtime / daemon-not-running error messages for both Docker and Podman.
Add unit tests in test/bin/start-keycloak/getContainerRuntime.spec.ts.
Testing
npm run test:types
npm run build
vitest run (5 test files, 34 tests passed)
Tested keycloakify start-keycloak --keycloak-version 26.8.2 end-to-end against keycloakify-starter using Podman 6.1.4 on Windows (no Docker installed).
Summary by CodeRabbit
New Features
Keycloak can now be started using either Docker or Podman, with the available runtime selected automatically.
Startup instructions and error messages reflect the selected runtime, and realm configuration backups work with either option.
No actionable comments were generated in the recent review.
Walkthrough
The startup command and realm-dump script now detect Docker or Podman and use the selected runtime for container operations. Realm configuration backup passes the runtime through to database copying, realm export, cleanup, and realm-file copying. Tests cover runtime detection results.
Changes: Container Runtime Support
Layer / File(s)
Summary
Runtime detection and startup src/bin/start-keycloak/getContainerRuntime.ts, src/bin/start-keycloak/start-keycloak.ts, test/bin/start-keycloak/getContainerRuntime.spec.ts
The new detection function checks Docker, then Podman. The startup command uses the selected runtime for its availability check, container cleanup, displayed run command, and container launch. Tests cover matching output, command failures, and unrecognized output.
Runtime propagation through realm backup src/bin/start-keycloak/realmConfig/realmConfig.ts, src/bin/start-keycloak/realmConfig/dumpContainerConfig.ts
getRealmConfig passes the selected runtime to dumpContainerConfig. Database copying, realm export, temporary data cleanup, and realm-file copying use that runtime. Failure messages name the configured runtime.
sequenceDiagram
participant Start as start-keycloak command
participant Detector as getContainerRuntime
participant Docker
participant Podman
participant Runtime as selected runtime CLI
participant RealmConfig as getRealmConfig
participant Dump as dumpContainerConfig
Start->>Detector: Detect available runtime
Detector->>Docker: Run --version
Docker-->>Detector: Return output or command failure
Detector->>Podman: Check if Docker does not match
Podman-->>Detector: Return output or command failure
Detector-->>Start: Return docker, podman, or undefined
Start->>Runtime: Run info, cleanup, and container launch commands
Start->>RealmConfig: Pass selected runtime
RealmConfig->>Dump: Pass selected runtime for backup
Dump->>Runtime: Copy database, export realm, clean up, and copy realm file
Loading
Suggested reviewers:garronej, mkreu
Merge Risk: Minimal · up to bd79f
This change lets the Keycloak startup and realm-dump commands use Podman when Docker is not installed, while keeping Docker, including the podman-docker shim, preferred. No concrete merge-blocking risk was found.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title names the main change: start-keycloak now falls back to Podman when Docker is not installed. The changeset adds getContainerRuntime(), which checks Docker first and then Podman, and threads …
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the main change: start-keycloak now falls back to Podman when Docker is not installed. The changeset adds getContainerRuntime(), which checks Docker first and then Podman, and threads the selected runtime through start-keycloak, getRealmConfig, dumpContainerConfig, and scripts/dump-keycloak-realm.ts. The title is specific and matches the PR objectives. The conventional-commit prefix is acceptable and does not make the title noisy.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.
This branch has not been deployed
No deployments
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
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.
Summary
getContainerRuntime()insrc/bin/start-keycloak/getContainerRuntime.tsto detectdockerfirst (preservingpodman-dockershim support) and fall back topodmanwhendockeris not installed.start-keycloak,getRealmConfig/dumpContainerConfig, andscripts/dump-keycloak-realm.tsto use the detected container runtime instead of hardcodingdocker.test/bin/start-keycloak/getContainerRuntime.spec.ts.Testing
npm run test:typesnpm run buildvitest run(5 test files, 34 tests passed)keycloakify start-keycloak --keycloak-version 26.8.2end-to-end againstkeycloakify-starterusing Podman 6.1.4 on Windows (no Docker installed).Summary by CodeRabbit