File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,9 +13,6 @@ ENV GOROOT=/usr/lib/go
1313ENV GOPATH=/go
1414ENV PATH=/go/bin:$PATH
1515
16- ENV CGO_ENABLED=${FIPS:+1}
17- ENV GOEXPERIMENT=${FIPS:+boringcrypto}
18-
1916RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin
2017RUN mkdir -p /tmp/dd/datadog-agent
2118
@@ -33,6 +30,12 @@ WORKDIR /tmp/dd/datadog-agent/cmd/serverless
3330
3431RUN --mount=type=cache,target=/go/pkg/mod \
3532 --mount=type=cache,target=/root/.cache/go-build \
33+ if [ "$FIPS" = "1" ]; then \
34+ export CGO_ENABLED=1; \
35+ export GOEXPERIMENT=boringcrypto; \
36+ fi; \
37+ echo CGO_ENABLED=$CGO_ENABLED; \
38+ echo GOEXPERIMENT=$GOEXPERIMENT; \
3639 if [ -z "$AGENT_VERSION" ]; then \
3740 /usr/lib/go/bin/go build -ldflags="-w -extldflags '-static' \
3841 -X github.com/DataDog/datadog-agent/pkg/serverless/tags.currentExtensionVersion=$EXTENSION_VERSION" \
Original file line number Diff line number Diff line change @@ -4,9 +4,6 @@ ARG AGENT_VERSION
44ARG BUILD_TAGS
55ARG FIPS
66
7- ENV CGO_ENABLED=${FIPS:+1}
8- ENV GOEXPERIMENT=${FIPS:+boringcrypto}
9-
107RUN mkdir -p /tmp/dd/datadog-agent
118
129RUN yum install -y wget tar gzip gcc
@@ -34,6 +31,12 @@ WORKDIR /tmp/dd/datadog-agent/cmd/serverless
3431
3532RUN --mount=type=cache,target=/root/go/pkg/mod \
3633 --mount=type=cache,target=/root/.cache/go-build \
34+ if [ "$FIPS" = "1" ]; then \
35+ export CGO_ENABLED=1; \
36+ export GOEXPERIMENT=boringcrypto; \
37+ fi; \
38+ echo CGO_ENABLED=$CGO_ENABLED; \
39+ echo GOEXPERIMENT=$GOEXPERIMENT; \
3740 if [ -z "$AGENT_VERSION" ]; then \
3841 /usr/local/go/bin/go build -ldflags="-w \
3942 -X github.com/DataDog/datadog-agent/pkg/serverless/tags.currentExtensionVersion=$EXTENSION_VERSION" \
You can’t perform that action at this time.
0 commit comments