packaged by Chainguard
Contact our team to test out this image for free. Please also indicate any other images you would like to evaluate.
Chainguard Containers are regularly-updated, secure-by-default container images.
For those with access, this container image is available on cgr.dev:
Be sure to replace the ORGANIZATION placeholder with the name used for your organization's private repository within the Chainguard Registry.
The python-fips Chainguard Image provides a FIPS-enabled Python runtime suitable for workloads such as web applications, CLI utilities, interfacing with APIs, or other tasks.
Where possible, the python-fips Chainguard Image is built for compatibility with the Docker official image for Python.
The python-fips Chainguard Image ships with a validated redistribution of the OpenSSL's FIPS provider module. For more on FIPS support in Chainguard Images, consult the guide on FIPS-enabled Chainguard Images on Chainguard Academy
By default, the python-fips Chainguard Image runs as a non-root user. You may need to use USER root to perform tasks requiring elevated privileges.
The entrypoint for the python Chainguard Image is /usr/bin/python. Commands run as part of docker run or a CMD statement in a Dockerfile will be passed as arguments to python.
We have two image variants available:
python-fips:latest-dev variant that contains the pip and apk package managers and the bash, ash, and sh shells.To pull the minimal runtime variant from cgr.dev:
To pull the dev variant:
Internal _hashlib module exposes the result of EVP_default_properties_is_fips_enabled
With Chainguard FIPS Provider for OpenSSL 3.4 and earlier, HMAC-SHA1 is allowed:
Starting with Chainguard FIPS Provider for OpenSSL 3.6, HMAC-SHA1 will be blocked:
MD5 digest is available for non-security purposes such as non-cryptographically secure CRC checks. This enables using Chainguard Python FIPS images to process PDF files; compute document identifiers in the US Justice system; enables multi-part uploads to all public cloud storage bucket providers such as AWS S3, Azure, Cloudflare R2, Google Cloud Storage and similar.
The following provides an example of a CLI application that does not require additional Python dependencies.
First, create a project folder for the example and change the working directory to that folder:
Next, create the Python script:
Create a Dockerfile for our image build:
Make sure to replace the value of the ORGANIZATION placeholder with the name of your organization.
Build the image:
Run the container with the following:
You should see the following output:
You can also run the CLI application with an argument:
If you require additional packages that can be installed with the pip package manager, we recommend using a multistage build. This process involves installing packages in a virtual environment using the latest-dev variant, then copying this environment over to the minimal runtime image. The following example uses a multi-stage build to install packages necessary to run a Flask web application.
First, create a project folder for the example:
Next, create the script for our Flask web application:
Next, create a requirements.txt file listing dependencies:
Finally, let's create a Dockerfile for our image build:
Again, make sure to replace the value of the ORGANIZATION placeholder variable with the name of your organization.
Build the image:
Run a container to serve the web application:
The application should now be accessible at http://localhost:8000/.
Chainguard's free tier of Starter container images are built with Wolfi, our minimal Linux undistro.
All other Chainguard Containers are built with Chainguard OS, Chainguard's minimal Linux operating system designed to produce container images that meet the requirements of a more secure software supply chain.
The main features of Chainguard Containers include:
For cases where you need container images with shells and package managers to build or debug, most Chainguard Containers come paired with a development, or -dev, variant.
In all other cases, including Chainguard Containers tagged as :latest or with a specific version number, the container images include only an open-source application and its runtime dependencies. These minimal container images typically do not contain a shell or package manager.
Although the -dev container image variants have similar security features as their more minimal versions, they include additional software that is typically not necessary in production environments. We recommend using multi-stage builds to copy artifacts from the -dev variant into a more minimal production image.
To improve security, Chainguard Containers include only essential dependencies. Need more packages? Chainguard customers can use Custom Assembly to add packages, either through the Console, chainctl, or API.
To use Custom Assembly in the Chainguard Console: navigate to the image you'd like to customize in your Organization's list of images, and click on the Customize image button at the top of the page.
Refer to our Chainguard Containers documentation on Chainguard Academy. Chainguard also offers VMs and Libraries — contact us for access.
This software listing is packaged by Chainguard. The trademarks set forth in this offering are owned by their respective companies, and use of them does not imply any affiliation, sponsorship, or endorsement by such companies.
Chainguard's container images contain software packages that are direct or transitive dependencies. The following licenses were found in the "latest" tag of this image:
Apache-2.0
BSD-1-Clause
BSD-2-Clause
BSD-3-Clause
BSD-4-Clause-UC
CC-PDDC
GCC-exception-3.1
For a complete list of licenses, please refer to this Image's SBOM.
Software license agreementChainguard Containers are SLSA Level 3 compliant with detailed metadata and documentation about how it was built. We generate build provenance and a Software Bill of Materials (SBOM) for each release, with complete visibility into the software supply chain.
SLSA compliance at ChainguardThis image helps reduce time and effort in establishing PCI DSS 4.0 compliance with low-to-no CVEs.
PCI DSS at ChainguardThis is a FIPS validated image for FedRAMP compliance.
This image is STIG hardened and scanned against the DISA General Purpose Operating System SRG with reports available.
Learn more about STIGsGet started with STIGsImage contains multiple maintained release tracks and is eligible for end of life support.