From f6c1c0d91305b9cc2c393234fdf2757c1ee9c733 Mon Sep 17 00:00:00 2001 From: Wesley Hayutin Date: Mon, 16 Mar 2026 19:53:44 -0600 Subject: [PATCH] first pass at a konflux dockerfile Signed-off-by: Wesley Hayutin --- konflux.Dockerfile | 52 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 konflux.Dockerfile diff --git a/konflux.Dockerfile b/konflux.Dockerfile new file mode 100644 index 0000000000..7b7318c649 --- /dev/null +++ b/konflux.Dockerfile @@ -0,0 +1,52 @@ +# ============================================================================= +# Stage 1: Build frontend +# ============================================================================= +FROM registry.access.redhat.com/ubi9/nodejs-24:latest AS frontend-builder + +USER 0 +WORKDIR /app + +RUN npm install -g pnpm@10.29.2 + +COPY frontend/package.json frontend/pnpm-lock.yaml ./ +RUN pnpm install --frozen-lockfile + +COPY frontend/ ./ +RUN pnpm run build + +# ============================================================================= +# Stage 2: Build Go backend +# ============================================================================= +FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_golang_1.25 AS builder + +COPY . . +WORKDIR $APP_ROOT/app/ +COPY go.mod go.mod +COPY go.sum go.sum +RUN go mod download +COPY . . +COPY --from=frontend-builder /app/dist ./frontend/dist + +ENV BUILDTAGS strictfipsruntime +ENV GOEXPERIMENT strictfipsruntime +RUN CGO_ENABLED=1 GOOS=linux go build -tags "$BUILDTAGS" -mod=mod -a -o filebrowser . + +# ============================================================================= +# Stage 3: Runtime image +# ============================================================================= +FROM registry.redhat.io/ubi9/ubi:latest + +COPY --from=builder $APP_ROOT/app/filebrowser /filebrowser + +USER 65532:65532 + +EXPOSE 8080 + +ENTRYPOINT ["/filebrowser"] +CMD [] + +LABEL description="OADP VM file restore file browser" +LABEL io.k8s.description=" OADP VM file restore file browser" +LABEL io.k8s.display-name="OADP File Browser" +LABEL io.openshift.tags="filebrowser,filemanager,web" +LABEL summary="OADP File Browser"