Repository navigation
NO-ISSUE: Switch UI images from flightctl-base to ubi-micro #882
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,9 +16,16 @@ FROM registry.access.redhat.com/ubi9/go-toolset:1.26.10-1793621864 as proxy-buil | |
| WORKDIR /app | ||
| COPY proxy /app | ||
| USER 0 | ||
|
|
||
| # Install runtime dependencies into a separate root for the final image | ||
| RUN dnf install -y --installroot=/runtime-root --setopt=install_weak_deps=False --nodocs \ | ||
| openssl-libs tzdata && \ | ||
| dnf --installroot=/runtime-root clean all | ||
|
|
||
| RUN CGO_ENABLED=1 CGO_CFLAGS=-flto GOEXPERIMENT=strictfipsruntime go build | ||
|
|
||
| FROM quay.io/flightctl/flightctl-base:9.7-1762965531 | ||
| FROM registry.access.redhat.com/ubi9/ubi-micro:9.8-1793860449 | ||
| COPY --from=proxy-build /runtime-root/ / | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| COPY --from=ui-build /app/apps/standalone/dist /app/proxy/dist | ||
| COPY --from=proxy-build /app/flightctl-ui /app/proxy | ||
| WORKDIR /app/proxy | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Script executed:
Repository: flightctl/flightctl-ui
Length of output: 2191
Web query:
Red Hat UBI micro container image default USER in image config, ubi9/ubi-micro and ubi10/ubi-micro, root or non-rootResult:
Set a non-root
USERin the final stage of all four Containerfiles.The final stage of each file sets no
USER. TheUSER rootandUSER 0lines appear only in theui-buildandproxy-buildstages. UBI Micro is a scratch-based image, and an image without a configured user runs as UID 0. The proxy therefore runs as root inside the container, so a compromised proxy gains root privileges in the container.The path instructions require
USER non-rootfor these files.Add a numeric non-root
USERas the last instruction of the final stage inpackaging/images/el9/Containerfile,packaging/images/el9/Containerfile.ocp,packaging/images/el10/Containerfile, andpackaging/images/el10/Containerfile.ocp. Confirm that the chosen UID can read the copied/runtime-rootfiles and bind the port the proxy listens on.