File tree 3 files changed +11
-1
lines changed
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
8
8
9
9
FROM base AS builder
10
10
COPY . .
11
+
12
+ ENV CGO_ENABLED=1
13
+ ENV GOEXPERIMENT=boringcrypto
14
+
11
15
RUN go mod tidy
12
16
RUN make build
13
17
RUN cp postgres_exporter /bin/postgres_exporter
@@ -22,4 +26,4 @@ FROM quay.io/sysdig/sysdig-stig-mini-ubi9:1.2.0 AS ubi
22
26
COPY --from=builder /bin/postgres_exporter /bin/postgres_exporter
23
27
EXPOSE 9187
24
28
USER 59000:59000
25
- ENTRYPOINT [ "/bin/postgres_exporter" ]
29
+ ENTRYPOINT [ "/bin/postgres_exporter" ]
Original file line number Diff line number Diff line change 25
25
# Ensure GOBIN is not set during build so that promu is installed to the correct path
26
26
unexport GOBIN
27
27
28
+ # Export flags required for FIPS compliance
29
+ export CGO_ENABLED=1
30
+ export GOEXPERIMENT=boringcrypto
31
+
28
32
GO ?= go
29
33
GOFMT ?= $(GO)fmt
30
34
FIRST_GOPATH := $(firstword $(subst :, ,$(shell $(GO) env GOPATH)))
Original file line number Diff line number Diff line change @@ -19,6 +19,8 @@ import (
19
19
"os"
20
20
"strings"
21
21
22
+ _ "crypto/tls/fipsonly"
23
+
22
24
"github.com/alecthomas/kingpin/v2"
23
25
"github.com/go-kit/log"
24
26
"github.com/go-kit/log/level"
You can’t perform that action at this time.
0 commit comments