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"]