Skip to content

Commit

Permalink
Updating Dockerfile with new builder image to pass konflux pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
Ellen-Yi-Dong committed Jul 26, 2024
1 parent e46b31c commit 3d10729
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3d10729

Please sign in to comment.