From e331d268c707ec8f3aab80e79af824cc7316a02c Mon Sep 17 00:00:00 2001 From: Chetan Banavikalmutt Date: Thu, 26 Sep 2024 19:12:32 +0530 Subject: [PATCH] Replace Go image in the Dockerfile Signed-off-by: Chetan Banavikalmutt --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2299e0e..d42bc80 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,12 @@ -FROM openshift/origin-release:golang-1.21 AS build +FROM golang:1.21 AS build WORKDIR /go/src COPY . /go/src RUN GIT_COMMIT=$(git rev-parse HEAD) && \ CGO_ENABLED=0 GOOS=linux go build -a -mod=readonly \ -ldflags "-X github.com/redhat-developer/gitops-backend/pkg/health.GitRevision=${GIT_COMMIT}" ./cmd/backend-http -FROM registry.access.redhat.com/ubi8/ubi-minimal -WORKDIR /root/ +FROM scratch +WORKDIR / COPY --from=build /go/src/backend-http . EXPOSE 8080 ENTRYPOINT ["./backend-http"]