From 3d1072927bf42366f727f9f4f8f3d02de1667fbc Mon Sep 17 00:00:00 2001 From: Ellen-Yi-Dong Date: Thu, 25 Jul 2024 19:03:10 -0700 Subject: [PATCH] Updating Dockerfile with new builder image to pass konflux pipelines --- Dockerfile | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index cb3e19b..94ac95c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,18 +2,31 @@ # Use go-toolset as the builder image # Once built, copys GO executable to a smaller image and runs it from there # FROM registry.redhat.io/ubi8/go-toolset as builder -FROM quay.io/projectquay/golang:1.20 as builder +# FROM quay.io/projectquay/golang:1.20 as builder + +# WORKDIR /go/src/app + +# COPY go.mod go.sum ./ + +# RUN go mod download + +# COPY . . + +# USER 0 + +# RUN make + +FROM registry.access.redhat.com/ubi8/go-toolset:1.20.10 AS builder WORKDIR /go/src/app COPY go.mod go.sum ./ -RUN go mod download +USER root +RUN go mod download COPY . . -USER 0 - RUN make # Using ubi8-minimal due to its smaller footprint