diff --git a/Dockerfile b/Dockerfile index cc5f946..f888f22 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,10 +2,10 @@ FROM golang:1.22 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 + GOEXPERIMENT=strictfipsruntime CGO_ENABLED=1 GOOS=linux go build -a -mod=mod -o /tmp/backend-http \ + -ldflags "-X github.com/redhat-developer/gitops-backend/pkg/health.GitRevision=${GIT_COMMIT}" -tags strictfipsruntime ./cmd/backend-http -FROM scratch +FROM registry.access.redhat.com/ubi8/ubi-minimal WORKDIR / COPY --from=build /go/src/backend-http . EXPOSE 8080