Skip to content

Commit 4118a5a

Browse files
authored
fix: Konflux image for FIPS compliance (#89)
- update build+runtime images to stable hash, aligned to opendatahub-io/llm-d-router@97b3300 - runtime image contains updated OpenSSL libraries necessary for FIPS compliance - make CGO_ENABLED=1 default - add GOEXPERIMENT=strictfipsruntime to build --- Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com>
1 parent 00ef8f9 commit 4118a5a

3 files changed

Lines changed: 12 additions & 15 deletions

File tree

docker/Dockerfile.apiserver.konflux

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
FROM registry.access.redhat.com/ubi9/go-toolset:1.25 AS builder
1+
FROM registry.access.redhat.com/ubi9/go-toolset:1.25.8@sha256:8c5aeac74b4b60dc2e5e44f6b639186b7ec2fec8f0eb9a36d4a32dcf8e255f52 AS builder
22
ARG TARGETOS=linux
33
ARG TARGETARCH
4-
ARG CGO_ENABLED=0
4+
ARG CGO_ENABLED=1
55

66
WORKDIR /opt/app-root/src
77
# Copy the Go Modules manifests
@@ -22,10 +22,9 @@ COPY pkg/ pkg/
2222
# the docker BUILDPLATFORM arg will be linux/arm64 when for Apple x86 it will be linux/amd64. Therefore,
2323
# by leaving it empty we can ensure that the container and binary shipped on it will have the same platform.
2424
RUN mkdir -p bin && \
25-
CGO_ENABLED=${CGO_ENABLED} GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -a -o bin/batch-gateway-apiserver ./cmd/apiserver
25+
CGO_ENABLED=${CGO_ENABLED} GOOS=${TARGETOS} GOARCH=${TARGETARCH} GOEXPERIMENT=strictfipsruntime go build -a -o bin/batch-gateway-apiserver ./cmd/apiserver
2626

27-
# TODO: switch base image to gcr.io/distroless/static:nonroot before release
28-
FROM registry.access.redhat.com/ubi9/ubi-micro:latest
27+
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.7@sha256:d91be7cea9f03a757d69ad7fcdfcd7849dba820110e7980d5e2a1f46ed06ea3b
2928
WORKDIR /
3029
COPY --from=builder /opt/app-root/src/bin/batch-gateway-apiserver /app/batch-gateway-apiserver
3130
USER 1001:1001

docker/Dockerfile.gc.konflux

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
FROM registry.access.redhat.com/ubi9/go-toolset:1.25 AS builder
1+
FROM registry.access.redhat.com/ubi9/go-toolset:1.25.8@sha256:8c5aeac74b4b60dc2e5e44f6b639186b7ec2fec8f0eb9a36d4a32dcf8e255f52 AS builder
22
ARG TARGETOS=linux
33
ARG TARGETARCH
4-
ARG CGO_ENABLED=0
4+
ARG CGO_ENABLED=1
55

66
WORKDIR /opt/app-root/src
77
# Copy the Go Modules manifests
@@ -22,10 +22,9 @@ COPY pkg/ pkg/
2222
# the docker BUILDPLATFORM arg will be linux/arm64 when for Apple x86 it will be linux/amd64. Therefore,
2323
# by leaving it empty we can ensure that the container and binary shipped on it will have the same platform.
2424
RUN mkdir -p bin && \
25-
CGO_ENABLED=${CGO_ENABLED} GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -a -o bin/batch-gateway-gc ./cmd/batch-gc
25+
CGO_ENABLED=${CGO_ENABLED} GOOS=${TARGETOS} GOARCH=${TARGETARCH} GOEXPERIMENT=strictfipsruntime go build -a -o bin/batch-gateway-gc ./cmd/batch-gc
2626

27-
# TODO: switch base image to gcr.io/distroless/static:nonroot before release
28-
FROM registry.access.redhat.com/ubi9/ubi-micro:latest
27+
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.7@sha256:d91be7cea9f03a757d69ad7fcdfcd7849dba820110e7980d5e2a1f46ed06ea3b
2928
WORKDIR /
3029
COPY --from=builder /opt/app-root/src/bin/batch-gateway-gc /app/batch-gateway-gc
3130
USER 1001:1001

docker/Dockerfile.processor.konflux

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
FROM registry.access.redhat.com/ubi9/go-toolset:1.25 AS builder
1+
FROM registry.access.redhat.com/ubi9/go-toolset:1.25.8@sha256:8c5aeac74b4b60dc2e5e44f6b639186b7ec2fec8f0eb9a36d4a32dcf8e255f52 AS builder
22
ARG TARGETOS=linux
33
ARG TARGETARCH
4-
ARG CGO_ENABLED=0
4+
ARG CGO_ENABLED=1
55

66
WORKDIR /opt/app-root/src
77
# Copy the Go Modules manifests
@@ -22,10 +22,9 @@ COPY pkg/ pkg/
2222
# the docker BUILDPLATFORM arg will be linux/arm64 when for Apple x86 it will be linux/amd64. Therefore,
2323
# by leaving it empty we can ensure that the container and binary shipped on it will have the same platform.
2424
RUN mkdir -p bin && \
25-
CGO_ENABLED=${CGO_ENABLED} GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -a -o bin/batch-gateway-processor ./cmd/batch-processor
25+
CGO_ENABLED=${CGO_ENABLED} GOOS=${TARGETOS} GOARCH=${TARGETARCH} GOEXPERIMENT=strictfipsruntime go build -a -o bin/batch-gateway-processor ./cmd/batch-processor
2626

27-
# TODO: switch base image to gcr.io/distroless/static:nonroot before release
28-
FROM registry.access.redhat.com/ubi9/ubi-micro:latest
27+
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.7@sha256:d91be7cea9f03a757d69ad7fcdfcd7849dba820110e7980d5e2a1f46ed06ea3b
2928
WORKDIR /
3029
COPY --from=builder /opt/app-root/src/bin/batch-gateway-processor /app/batch-gateway-processor
3130
USER 1001:1001

0 commit comments

Comments
 (0)