Skip to content

Commit 64870a7

Browse files
authored
Merge pull request #41 from chetan-rns/update-go-image
Replace Go image in the Dockerfile
2 parents 1ae431a + e331d26 commit 64870a7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
FROM openshift/origin-release:golang-1.21 AS build
1+
FROM golang:1.21 AS build
22
WORKDIR /go/src
33
COPY . /go/src
44
RUN GIT_COMMIT=$(git rev-parse HEAD) && \
55
CGO_ENABLED=0 GOOS=linux go build -a -mod=readonly \
66
-ldflags "-X github.com/redhat-developer/gitops-backend/pkg/health.GitRevision=${GIT_COMMIT}" ./cmd/backend-http
77

8-
FROM registry.access.redhat.com/ubi8/ubi-minimal
9-
WORKDIR /root/
8+
FROM scratch
9+
WORKDIR /
1010
COPY --from=build /go/src/backend-http .
1111
EXPOSE 8080
1212
ENTRYPOINT ["./backend-http"]

0 commit comments

Comments
 (0)