Skip to content

feat: prefer podman over docker as default container engine#106

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift-online:mainfrom
jmelis:podman-support
Jul 17, 2026
Merged

feat: prefer podman over docker as default container engine#106
openshift-merge-bot[bot] merged 1 commit into
openshift-online:mainfrom
jmelis:podman-support

Conversation

@jmelis

@jmelis jmelis commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add CONTAINER_ENGINE Makefile variable that auto-detects podman, falling back to docker
  • Update ci/build-push-image.sh to prefer podman over docker
  • Update README examples to use podman as the primary container tool

Test plan

  • Verify make image works with podman installed
  • Verify make image falls back to docker when podman is absent
  • Verify CONTAINER_ENGINE=docker override works

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation

    • Updated E2E container usage examples to prefer Podman
    • Added explicit instructions for using Docker as an alternative container engine
  • Chores

    • Build and container commands now automatically detect and prefer Podman, with Docker fallback support
    • CI scripts updated to prioritize Podman for container runtime detection

Introduce CONTAINER_ENGINE variable in Makefile that auto-detects podman first, falling back to docker. Update ci/build-push-image.sh detection order to match. Update README examples to use podman as the primary tool.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 19, 2026
@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

The PR makes Podman the preferred container engine over Docker across the Makefile, ci/build-push-image.sh, and README. A new CONTAINER_ENGINE variable auto-detects podman first and falls back to docker. All hardcoded docker invocations in Makefile targets and the CI script are replaced with the variable, and README examples are updated accordingly.

Changes

Container Engine Preference: Podman over Docker

Layer / File(s) Summary
Engine auto-detection
Makefile, ci/build-push-image.sh
CONTAINER_ENGINE variable added to Makefile using command -v podman with docker fallback. CI script runtime detection reordered to check podman before docker.
Makefile targets switched to $(CONTAINER_ENGINE)
Makefile
All docker invocations in lint-ci-container, image, image-e2e, image-e2e-multiarch, image-e2e-push-multiarch, test-e2e-container, and image-push replaced with $(CONTAINER_ENGINE). Help output updated to include image and image-push entries.
README examples updated to prefer Podman
README.md
docker run examples changed to podman run. "Using Podman instead of Docker" section inverted to "Using Docker instead of Podman" with instructions to replace podman with docker or set CONTAINER_ENGINE=docker.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 error, 1 warning)

Check name Status Explanation Resolution
No-Sensitive-Data-In-Logs ❌ Error The new ci/build-push-image.sh file logs sensitive data: line 34 uses echo "${QUAY_PASSWORD}" which exposes the password token in shell history and CI/CD logs. Use a here-string instead: ${RUNTIME} login quay.io -u "${QUAY_USERNAME}" --password-stdin <<< "${QUAY_PASSWORD}" to avoid expanding the password in the command itself.
Ai-Attribution ⚠️ Warning AI tool (Claude Code) mentioned in PR description, but commit uses Co-Authored-By trailer instead of Red Hat-standard Assisted-by or Generated-by. Replace Co-Authored-By with Assisted-by or Generated-by trailer for proper AI attribution per Red Hat standards.
✅ Passed checks (9 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: prefer podman over docker as default container engine' directly and clearly describes the main change: introducing podman as the preferred container engine with docker as fallback.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
No-Weak-Crypto ✅ Passed PR contains no cryptographic code. Changes are limited to Makefile, shell script, and README updates for container engine selection (podman vs docker).
Container-Privileges ✅ Passed No privileged container configurations (privileged: true, hostPID, hostNetwork, hostIPC, SYS_ADMIN, allowPrivilegeEscalation: true) found in any manifests or Dockerfiles. Main Dockerfile follows be...
No-Hardcoded-Secrets ✅ Passed No hardcoded secrets found. Credentials are referenced as environment variables (${QUAY_PASSWORD}, ${QUAY_USERNAME}), not hardcoded literals. Documentation uses placeholders.
No-Injection-Vectors ✅ Passed No injection vectors introduced. CONTAINER_ENGINE and RUNTIME variables are set to literal safe strings (podman/docker paths) from tool detection, not user input. All uses properly quote sensitive...
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Makefile`:
- Around line 217-221: The image-e2e-multiarch and image-e2e-push-multiarch
targets use BuildKit-specific flags (--platform with buildx, --load, and --push)
that Podman does not support since Podman's buildx is just an alias for podman
build. Implement engine-specific logic by either creating separate conditional
targets or using a conditional check within each target that branches based on
the CONTAINER_ENGINE variable. For Podman, use native podman build commands
without the unsupported flags, or alternatively document and enforce that these
targets require Docker. For Docker, keep the existing buildx build commands with
the --platform, --load, and --push flags intact.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift-online/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 1afda74f-58c2-4b47-8e14-ba38d11f7529

📥 Commits

Reviewing files that changed from the base of the PR and between 02a296e and 58545a8.

📒 Files selected for processing (3)
  • Makefile
  • README.md
  • ci/build-push-image.sh

Comment thread Makefile
Comment on lines +217 to 221
$(CONTAINER_ENGINE) buildx build -f Containerfile.e2e \
--platform $(PLATFORMS) \
-t $(IMAGE_REPO)-e2e:$(IMAGE_TAG) \
-t $(IMAGE_REPO)-e2e:$(GIT_SHA) \
--load .

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Inspect Makefile targets =="
rg -n -A8 -B2 '^(image-e2e-multiarch|test-e2e-container):' Makefile

echo
echo "== Check Podman buildx --load support (if podman exists) =="
if command -v podman >/dev/null 2>&1; then
  podman buildx build --help | rg -n -- '--load|--manifest|--platform' || true
else
  echo "podman not installed on this machine; skip runtime check."
fi

Repository: openshift-online/rosa-regional-platform-api

Length of output: 1243


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Check CONTAINER_ENGINE definition in Makefile =="
rg -n "CONTAINER_ENGINE\s*[?:=]" Makefile | head -20

echo
echo "== Check for Podman/Docker conditional logic =="
rg -n "podman|docker|CONTAINER_ENGINE" Makefile | head -30

echo
echo "== Look for related targets or workarounds =="
rg -n -B2 -A5 "buildx|--load" Makefile

echo
echo "== Check for any documentation about Podman compatibility =="
fd -t f "README|CONTRIBUTING|docs" -o -name "*podman*" -o -name "*docker*" 2>/dev/null | head -10
if [ -f "README.md" ]; then
  echo "=== Checking README.md for Podman/Docker guidance ==="
  rg -n -i "podman|docker.*buildx|--load" README.md || true
fi

Repository: openshift-online/rosa-regional-platform-api

Length of output: 1956


🌐 Web query:

Podman buildx build --load incompatibility issues limitations

💡 Result:

The command podman buildx build is not a full implementation of the Docker buildx tool. Instead, it serves as a compatibility alias for the native podman build command [1][2][3]. Because of this design, several key limitations and incompatibility issues exist: 1. Alias Limitations: Podman does not natively integrate with BuildKit (the engine behind Docker's buildx) [4]. When you run podman buildx build, Podman simply executes its own build engine (Buildah) [1][5]. Consequently, many features exclusive to Docker's buildx (such as advanced builder drivers or specific BuildKit-only options) are either unavailable or strictly limited [1][6]. 2. --load Incompatibility: In Docker, --load is a shorthand for outputting to the local image store [7]. While Podman ignores or provides compatibility for some basic flags to prevent script failures [7][2], it does not support the full range of BuildKit-specific build outputs or the native BuildKit "container" driver behavior [4]. Because Podman does not use BuildKit, attempting to use advanced buildx workflows that rely on BuildKit's internal state—such as cross-platform building via --platform or complex build contexts—often fails or requires significant manual workarounds like exporting to OCI tarballs and using podman load [4][8][9]. 3. Feature Gaps: Users frequently encounter errors when scripts rely on other buildx features such as --push (which is shorthand for --output=type=registry) [6]. Since Podman does not implement these BuildKit-native flags, such commands will fail with "unknown flag" errors or simply remain unsupported [6]. 4. Workarounds: If your workflow requires BuildKit-specific features, you cannot rely on the podman buildx alias. Instead, you must use BuildKit directly (e.g., via buildctl) to produce OCI images or tarballs, and subsequently import those images into the Podman storage manually using podman load [4][8][9]. Alternatively, you should use native Podman commands (podman build) and adapt your CI/CD pipelines to avoid dependencies on Docker-specific buildx/BuildKit syntax [6].

Citations:


image-e2e-multiarch and image-e2e-push-multiarch targets fail with Podman.

The Makefile auto-selects Podman when available (line 28), but both multiarch targets use unsupported BuildKit-specific flags:

  • image-e2e-multiarch (lines 217–221) uses --load, which Podman does not support
  • image-e2e-push-multiarch (lines 224–229) uses --push, which Podman does not support
  • Both use --platform with buildx, a BuildKit-only feature unavailable in Podman

Podman's buildx is merely an alias for podman build and does not provide full Docker BuildKit compatibility. Implement engine-specific logic (e.g., conditional targets or a wrapper function) to use native Podman commands when Podman is selected, or fall back to Docker.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Makefile` around lines 217 - 221, The image-e2e-multiarch and
image-e2e-push-multiarch targets use BuildKit-specific flags (--platform with
buildx, --load, and --push) that Podman does not support since Podman's buildx
is just an alias for podman build. Implement engine-specific logic by either
creating separate conditional targets or using a conditional check within each
target that branches based on the CONTAINER_ENGINE variable. For Podman, use
native podman build commands without the unsupported flags, or alternatively
document and enforce that these targets require Docker. For Docker, keep the
existing buildx build commands with the --platform, --load, and --push flags
intact.

@cdoan1

cdoan1 commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

/test

@cdoan1

cdoan1 commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

/test rosa-regionality-compatibility-e2e

@typeid typeid left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jun 30, 2026
@openshift-ci

openshift-ci Bot commented Jun 30, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jmelis, typeid

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci

openshift-ci Bot commented Jun 30, 2026

Copy link
Copy Markdown

@jmelis: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/rosa-regionality-compatibility-e2e 58545a8 link true /test rosa-regionality-compatibility-e2e

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@typeid

typeid commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

/retest-required

@openshift-merge-bot
openshift-merge-bot Bot merged commit 3554c17 into openshift-online:main Jul 17, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants