go-fips
Go-FIPS Overview
Secure your stack with a hardened Go-FIPS image freshly-built by Minimus. Minimus images always include the most up-to-date package version for all packages and dependencies contained in the image.
Use this image to compile FIPS-validated binaries using Go-FIPS together with Glibc-Dynamic-FIPS. Learn more about Go multi-stage builds
FIPS 140-3 Certification
This image is FIPS-validated to ensure its cryptographic operations meet the Federal Information Processing Standards (FIPS) required for secure government and regulated environments. Its core cryptographic modules are validated under the NIST Cryptographic Module Validation Program (CMVP) and comply with the FIPS 140-3 standard.
To verify that the FIPS 140-3 provider is configured and used in the image, follow the instructions for the OpenSSL FIPS module in the FIPS compliance tab.
Go-FIPS includes a proprietary minimus-cryptographic-module and openssl-fips-config that enforce FIPS mode, without the ability to opt out. Go-FIPS does not use native golang cryptographic functionality. Instead crypto-related packages are patched to redirect all calls to the OpenSSL FIPS provider. The Go-FIPS image is built using the new microsoft/go toolchain (First published January 2026; This replaces the previous source from golang-fips/go project)
Try It Out
Apps built with Go-FIPS also require an OpenSSL FIPS module which is provided by the Glibc-Dynamic-FIPS runtime image from Minimus. In this example, we build a simple web application with Go-FIPS and the Glibc-Dynamic-FIPS runtime image.
Step 1: Authenticate to the Minimus Registry
Step 2: Create a Dockerfile
In a new project directory, save the code below to a new Dockerfile:
# Pull Go-FIPS image and set it as builder
FROM reg.mini.dev/go-fips AS builder
ENV GOOS=linux GOARCH=amd64
# Copy the project directory content to app directory in the container
COPY . /app
# Compile Go application
RUN cd /app && go build -o Hello-Minimus-Web .
# Pull dynamic image to use as a runtime base
FROM reg.mini.dev/glibc-dynamic-fips:latest
# Copy Go binary from the /app directory in the builder container to /usr/bin/ in the final dynamic container
COPY --from=builder /app/Hello-Minimus-Web /usr/bin/
EXPOSE 8080
# Set entrypoint to run the binary when the container is started
ENTRYPOINT ["/usr/bin/Hello-Minimus-Web"]This example builds a dynamic Go application, meaning it is linked to database drivers or other C integrations. The CGO_ENABLED=1 flag is not needed in the Dockerfile because it is already enabled by default. The CGO_ENABLED=1 flag is responsible for compiling the Go code using dynamically linked binaries.
Step 3: Download the Sample Code
Download the example file hello-minimus-web.go and save it to your project directory. This is a very simple script that creates a webpage with several tabs so you can navigate between them.
Step 4: Declare Dependencies
In your project directory, create a go.mod file. This file declares the modules and dependencies required by the project. In our case, the module set is only needed for testing purposes, so it's very simple.
module minimus.dev/hello_minimus
go 1.25Step 5: Review Folder Structure
Your project directory should now look like this:
project-root/
├── Dockerfile
├── hello-minimus-web.go
└── go.modStep 6: Build the App
From your project directory, build your custom image. Note that the period . specifies the current directory as the build context:
docker build -t hello-go-web .Step 7: Test the App
Run the final image we just created:
docker run -p 8080:8080 hello-go-webOpen your browser and go to http://localhost:8080/ to see the default welcome page.
Technical Considerations
The Go-FIPS image provided by Minimus is a slim, security-hardened alternative to the public image from Docker Hub. The images are largely interchangeable, with a few differences as noted below.
Go-FIPS built by Minimus:
- Runs as root to support required functions. The public image also runs as root.
- The default environment variables are different for different versions. Drill down on the version specification tab to view the environment variables for each image version.
- The following environment variables are enabled by default in version 1.26.x and 1.25.x:
GODEBUG=tarinsecurepath=0,zipinsecurepath=0,fips140=on,GOFLAGS=-tags=requirefips. - The following environment variables are enabled by default in version 1.24.x:
GODEBUG=tarinsecurepath=0,zipinsecurepath=0,GOEXPERIMENT=strictfipsruntime,GOLANG_FIPS=1. - If you want to disable
GODEBUG, settarinsecurepath=1andzipinsecurepath=1.
The Payoff
A hardened, minimal image that will remain more secure for the long run and accrue vulnerabilities at a slower rate.
- See the risk reduction dashboard for a detailed CVE comparison over the past 30 days.
- Review the compliance report to see the default hardening and security configurations for the image.
Terms & Info
Trademark
This catalog is published by Minimus. All product names, logos, and marks, other than those belonging to Minimus, shown are owned by their respective rights holders and appear here only to identify the open source software each image contains. Minimus claims no ownership of those marks and implies no affiliation with, endorsement by, certification by, or sponsorship by any rights holder.
Disclaimer
Images are provided "as-is" without warranty of any kind. "Hardened" refers to the security configuration applied at the time of build and does not constitute a guarantee of ongoing security or absence of vulnerabilities. The free tier is provided without support, SLA, or guaranteed patching timelines. Security updates may be applied to paid subscriptions before or instead of free tier images. By pulling or using any image you agree to our Terms of Use.