File tree Expand file tree Collapse file tree 3 files changed +11
-1
lines changed
Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,10 @@ WORKDIR /go/src/github.com/prometheus-community/postgres_exporter
88
99FROM base AS builder
1010COPY . .
11+
12+ ENV CGO_ENABLED=1
13+ ENV GOEXPERIMENT=boringcrypto
14+
1115RUN go mod tidy
1216RUN make build
1317RUN cp postgres_exporter /bin/postgres_exporter
@@ -22,4 +26,4 @@ FROM quay.io/sysdig/sysdig-stig-mini-ubi9:1.2.0 AS ubi
2226COPY --from=builder /bin/postgres_exporter /bin/postgres_exporter
2327EXPOSE 9187
2428USER 59000:59000
25- ENTRYPOINT [ "/bin/postgres_exporter" ]
29+ ENTRYPOINT [ "/bin/postgres_exporter" ]
Original file line number Diff line number Diff line change 2525# Ensure GOBIN is not set during build so that promu is installed to the correct path
2626unexport GOBIN
2727
28+ # Export flags required for FIPS compliance
29+ export CGO_ENABLED=1
30+ export GOEXPERIMENT=boringcrypto
31+
2832GO ?= go
2933GOFMT ?= $(GO)fmt
3034FIRST_GOPATH := $(firstword $(subst :, ,$(shell $(GO) env GOPATH)))
Original file line number Diff line number Diff line change @@ -19,6 +19,8 @@ import (
1919 "os"
2020 "strings"
2121
22+ _ "crypto/tls/fipsonly"
23+
2224 "github.com/alecthomas/kingpin/v2"
2325 "github.com/go-kit/log"
2426 "github.com/go-kit/log/level"
You can’t perform that action at this time.
0 commit comments