Skip to content

fix: migrate dev Dockerfile from Docker to UBI#925

Open
mprpic wants to merge 1 commit intomainfrom
migrate-backend-dev-dockerfile-to-ubi
Open

fix: migrate dev Dockerfile from Docker to UBI#925
mprpic wants to merge 1 commit intomainfrom
migrate-backend-dev-dockerfile-to-ubi

Conversation

@mprpic
Copy link
Contributor

@mprpic mprpic commented Mar 16, 2026

Replace golang:1.24-alpine with
registry.access.redhat.com/ubi9/go-toolset:1.24. Remove apk install of git and build-base as go-toolset already includes them.

@coderabbitai
Copy link

coderabbitai bot commented Mar 16, 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: 66d75b37-1a18-40ff-98f5-980779565c80

📥 Commits

Reviewing files that changed from the base of the PR and between e5eee4d and 4fe8d2d.

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

Walkthrough

Dockerfile.dev base image changed from golang:1.24-alpine to registry.access.redhat.com/ubi9/go-toolset:1.24; explicit USER 0 introduced, APK-based dependency installation removed, chown -R 1001:0 /app added and final runtime user set to USER 1001.

Changes

Cohort / File(s) Summary
Dockerfile change
components/backend/Dockerfile.dev
Base image switched from Alpine Go to Red Hat UBI Go-toolset; added explicit USER 0, removed apk add build deps, reintroduced WORKDIR, added chown -R 1001:0 /app, and final runtime user set to USER 1001 (non-root).

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 describes the main change: migrating the dev Dockerfile from a standard Docker image (alpine) to Red Hat UBI base image.
Description check ✅ Passed The description clearly explains the changes made: replacing the golang base image with UBI equivalent and removing redundant build dependencies.
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
  • Post copyable unit tests in a comment
  • Commit unit tests in branch migrate-backend-dev-dockerfile-to-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: 1

🤖 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/backend/Dockerfile.dev`:
- Line 4: The Dockerfile.dev currently sets USER 0 (root) which is a security
regression; update Dockerfile.dev to create and switch to a non-root user
(create a dedicated group/user, set a non-root UID/GID), adjust ownership of
application directories/files with chown to that user, set an appropriate
WORKDIR/HOME for that user, and replace the final USER 0 line with the non-root
username or UID so the container does not run as root at runtime. Ensure any
files or ports requiring access are owned or permissioned for that user so the
build and runtime steps (e.g., install/build steps and the final process) run
correctly without root.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 8a0a4472-8499-4b68-8efd-f80a0ca1b2e9

📥 Commits

Reviewing files that changed from the base of the PR and between f6a5543 and e5eee4d.

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

Replace golang:1.24-alpine with
registry.access.redhat.com/ubi9/go-toolset:1.24. Remove apk install of
git and build-base as go-toolset already includes them.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Martin Prpič <mprpic@redhat.com>
@mprpic mprpic force-pushed the migrate-backend-dev-dockerfile-to-ubi branch from e5eee4d to 4fe8d2d Compare March 16, 2026 15:41
@ambient-code ambient-code bot added this to the Review Queue milestone Mar 17, 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.

1 participant