Files
pinniped/pipelines/shared-helpers/test-binaries-image/Dockerfile_fips
T
dependabot[bot]andGitHub dbb97f04b5 Bump golang in /pipelines/shared-helpers/test-binaries-image
Bumps golang from 1.25.3-bookworm to 1.25.4-bookworm.

---
updated-dependencies:
- dependency-name: golang
  dependency-version: 1.25.4-bookworm
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-06 01:12:53 +00:00

28 lines
1.1 KiB
Plaintext

# syntax = docker/dockerfile:experimental
# Copyright 2020-2025 the Pinniped contributors. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
# we need a separate dockerfile for the fips test image so that the integration tests
# use the right ciphers etc.
FROM golang:1.25.4-bookworm as build-env
WORKDIR /work
COPY . .
ARG GOPROXY
# build the cli with strict fips
RUN \
--mount=target=. \
--mount=type=cache,target=/cache/gocache \
--mount=type=cache,target=/cache/gomodcache \
export GOCACHE=/cache/gocache GOMODCACHE=/cache/gomodcache && \
mkdir /tmp/out && \
export GOOS=linux && \
export GOARCH=amd64 && \
export GOEXPERIMENT=boringcrypto && \
CGO_ENABLED=1 go build -tags fips_strict,osusergo,netgo -v -trimpath -ldflags "$(hack/get-ldflags.sh) -w -linkmode=external -extldflags -static" -o /tmp/out/pinniped ./cmd/pinniped/main.go && \
CGO_ENABLED=1 go test -tags fips_strict,osusergo,netgo -c -ldflags "$(hack/get-ldflags.sh) -w -linkmode=external -extldflags -static" -vet=off -race ./test/integration -o /tmp/out/pinniped-integration-test # need cgo for race detector
FROM scratch
COPY --from=build-env /tmp/out/ /usr/local/bin/