Skip to content

fix(frontend): migrate dev Dockerfile from Docker to UBI image#946

Merged
mergify[bot] merged 2 commits intomainfrom
frontend-dev-dockerfile-use-ubi
Mar 18, 2026
Merged

fix(frontend): migrate dev Dockerfile from Docker to UBI image#946
mergify[bot] merged 2 commits intomainfrom
frontend-dev-dockerfile-use-ubi

Conversation

@mprpic
Copy link
Contributor

@mprpic mprpic commented Mar 18, 2026

Replace node:20-alpine with registry.access.redhat.com/ubi9/nodejs-20 for consistency with other components. Remove apk install of libc6-compat, python3, make, and g++ as the UBI nodejs-20 s2i builder image already includes them.

Replace node:20-alpine with registry.access.redhat.com/ubi9/nodejs-20
for consistency with other components. Remove apk install of
libc6-compat, python3, make, and g++ as the UBI nodejs-20 s2i builder
image already includes them.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Martin Prpič <mprpic@redhat.com>
@coderabbitai
Copy link

coderabbitai bot commented Mar 18, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 7f6ddab9-f314-44da-965b-e25f73f1a269

📥 Commits

Reviewing files that changed from the base of the PR and between 153d08b and 45bb164.

📒 Files selected for processing (1)
  • components/frontend/Dockerfile.dev

Walkthrough

Frontend Docker development image updated: base changed to a Red Hat UBI9 Node.js image, Alpine-specific package steps removed, root user and working directory ensured, telemetry disabled, port 3000 exposed, and container CMD installs deps then starts the dev server.

Changes

Cohort / File(s) Summary
Frontend Development Container
components/frontend/Dockerfile.dev
Base image changed from node:20-alpine to registry.access.redhat.com/ubi9/nodejs-20:1. Removed Alpine package installs and related RUN lines. Added USER 0, ensured WORKDIR /app, kept ENV NODE_ENV=development, added ENV NEXT_TELEMETRY_DISABLED=1, EXPOSE 3000, and CMD ["sh", "-c", "npm ci && npm run dev"].

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: migrating the dev Dockerfile from Docker's Alpine image to Red Hat's UBI image.
Description check ✅ Passed The description directly relates to the changeset, explaining the migration from Alpine to UBI image and why build dependencies can be removed.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch frontend-dev-dockerfile-use-ubi
📝 Coding Plan
  • Generate coding plan for human review comments

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

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@components/frontend/Dockerfile.dev`:
- Line 4: The Dockerfile contains a "USER 0" directive that forces the container
to run as root; either remove or replace it with the non-root user provided by
the UBI image (UID 1001) so the container runs as a non‑root user, or if running
as root is required for development, leave "USER 0" but add a clear comment next
to the "USER 0" line explaining the reason (e.g., volume permission workarounds)
and that it is only for dev; update any related build/run docs to reflect the
chosen approach and ensure tests still pass when using USER 1001 (check startup
scripts and file permissions).
- Line 2: The Dockerfile base image is unpinned; update the FROM line in
components/frontend/Dockerfile.dev (the FROM instruction referencing
registry.access.redhat.com/ubi9/nodejs-20) to a specific tag (for example change
to registry.access.redhat.com/ubi9/nodejs-20:1 or another chosen
timestamped/major tag) so builds are reproducible; ensure you commit the updated
FROM value and verify the image tag chosen matches the desired compatibility
level.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: a9d39c2e-6e1d-4cd6-8429-6fc7503524d5

📥 Commits

Reviewing files that changed from the base of the PR and between 151b9e1 and 153d08b.

📒 Files selected for processing (1)
  • components/frontend/Dockerfile.dev

@ambient-code ambient-code bot added this to the Review Queue milestone Mar 18, 2026
Pin nodejs-20 image to :1 for reproducible builds. Add comment
explaining why root is needed in the dev container.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@mergify mergify bot added the queued label Mar 18, 2026
mergify bot added a commit that referenced this pull request Mar 18, 2026
@mergify mergify bot merged commit b714979 into main Mar 18, 2026
34 checks passed
@mergify mergify bot deleted the frontend-dev-dockerfile-use-ubi branch March 18, 2026 17:25
@mergify
Copy link

mergify bot commented Mar 18, 2026

Merge Queue Status

This pull request spent 15 seconds in the queue, including 2 seconds running CI.

Required conditions to merge

@mergify mergify bot removed the queued label Mar 18, 2026
@ambient-code ambient-code bot removed this from the Review Queue milestone Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants