Skip to content

Commit

Permalink
Merge pull request #41 from chetan-rns/update-go-image
Browse files Browse the repository at this point in the history
Replace Go image in the Dockerfile
  • Loading branch information
chetan-rns authored Sep 27, 2024
2 parents 1ae431a + e331d26 commit 64870a7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]

0 comments on commit 64870a7

Please sign in to comment.