We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1ae431a commit f8db95fCopy full SHA for f8db95f
Dockerfile
@@ -1,12 +1,14 @@
1
-FROM openshift/origin-release:golang-1.21 AS build
+FROM golang:1.21 AS build
2
WORKDIR /go/src
3
COPY . /go/src
4
RUN GIT_COMMIT=$(git rev-parse HEAD) && \
5
CGO_ENABLED=0 GOOS=linux go build -a -mod=readonly \
6
-ldflags "-X github.com/redhat-developer/gitops-backend/pkg/health.GitRevision=${GIT_COMMIT}" ./cmd/backend-http
7
8
-FROM registry.access.redhat.com/ubi8/ubi-minimal
9
-WORKDIR /root/
+# Use distroless as minimal base image to package the manager binary
+# Refer to https://github.com/GoogleContainerTools/distroless for more details
10
+FROM gcr.io/distroless/static:nonroot
11
+WORKDIR /
12
COPY --from=build /go/src/backend-http .
13
EXPOSE 8080
14
ENTRYPOINT ["./backend-http"]
0 commit comments