Skip to content
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

fix(RHTAPREL-724): change minimal image #34

Merged
merged 1 commit into from
Nov 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Build the manager binary
FROM registry.access.redhat.com/ubi9/go-toolset:1.19 as builder
FROM registry.access.redhat.com/ubi9/go-toolset:1.20 as builder

ARG TARGETOS
ARG TARGETARCH

WORKDIR /workspace
# Copy the Go Modules manifests
COPY go.mod go.mod
COPY go.sum go.sum
Expand All @@ -27,16 +27,19 @@ COPY tekton/ tekton/
# by leaving it empty we can ensure that the container and binary shipped on it will have the same platform.
RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o manager main.go

# Use ubi-micro as minimal base image to package the manager binary
# See https://catalog.redhat.com/software/containers/ubi9/ubi-micro/615bdf943f6014fa45ae1b58
FROM registry.access.redhat.com/ubi9/ubi-micro:9.2-15.1696515526
WORKDIR /
COPY --from=builder /workspace/manager .
# Use ubi-minimal as minimal base image to package the manager binary
# See https://catalog.redhat.com/software/containers/ubi9-minimal/61832888c0d15aff4912fe0d
FROM registry.access.redhat.com/ubi9-minimal:9.3-1361
COPY --from=builder /opt/app-root/src/manager /

# Temp fix to address CVE-2023-38545 and CVE-2023-38546
RUN microdnf update -y curl-minimal

# It is mandatory to set these labels
LABEL description="RHTAP Internal Services"
LABEL io.k8s.description="RHTAP Internal Services"
LABEL io.k8s.display-name="internal-services"
LABEL io.openshift.tags="internal-services"
LABEL summary="RHTAP Internal Services"

USER 65532:65532
Expand Down
Loading