Skip to content

refactor: remove needing to use ROOT user in dockerfile#548

Merged
KevFan merged 2 commits intomainfrom
image-user
Aug 27, 2025
Merged

refactor: remove needing to use ROOT user in dockerfile#548
KevFan merged 2 commits intomainfrom
image-user

Conversation

@KevFan
Copy link
Contributor

@KevFan KevFan commented Jul 10, 2025

Description

  • Remove needing to use ROOT user in Dockerfile builder layer as it's not strictly necessary.
    • It was previously needed due to building the binary to /usr/bin which is protected from the default user.
  • Remove setting GO111MODULE
    • default is on from go v1.17

Verification

@KevFan KevFan self-assigned this Jul 10, 2025
@KevFan KevFan added kind/enhancement New feature or request size/small area/tooling Makefile and scripts for the dev workflow, testing, etc labels Jul 10, 2025
@KevFan KevFan moved this to In Progress in Kuadrant Jul 10, 2025
@KevFan KevFan requested a review from Copilot July 10, 2025 12:06
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the Dockerfile to remove the need for the root user in the builder stage by outputting the built binary to a writable directory and updating the final image to use an unprivileged user.

  • Drop USER root from builder stage
  • Change go build output from /usr/bin/authorino to /tmp/authorino
  • Update final COPY to pull the binary from /tmp/authorino into the unprivileged user’s bin directory

@KevFan KevFan marked this pull request as ready for review July 10, 2025 16:22
@KevFan KevFan requested a review from a team July 10, 2025 16:22
@KevFan KevFan moved this from In Progress to Ready For Review in Kuadrant Jul 10, 2025
KevFan added 2 commits July 21, 2025 15:30
Signed-off-by: KevFan <chfan@redhat.com>
Copy link
Member

@adam-cattermole adam-cattermole left a comment

Choose a reason for hiding this comment

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

Changes look good to me, built locally and all seems well

@KevFan KevFan added this pull request to the merge queue Aug 27, 2025
Merged via the queue into main with commit ddfd7e6 Aug 27, 2025
21 checks passed
@github-project-automation github-project-automation bot moved this from Ready For Review to Done in Kuadrant Aug 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/tooling Makefile and scripts for the dev workflow, testing, etc kind/enhancement New feature or request size/small

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants