DirectorySecurity Advisories
Sign In
Directory
chainguard-base-fips logoFIPS

chainguard-base-fips

Last changed

Create your Free Account

Be the first to hear about exciting product updates, critical vulnerability alerts, compare alternative images, and more.

Sign Up
Versions
Overview
Provenance
Specifications
SBOM
Vulnerabilities
Advisories

Chainguard Image for chainguard-base-fips

Minimal, FIPS-validated image useful as a base for building secure images.

Chainguard Images are regularly-updated, minimal container images with low-to-zero CVEs.

Download this Image

This image is available on cgr.dev:

docker pull cgr.dev/ORGANIZATION/chainguard-base-fips:latest

Be sure to replace the ORGANIZATION placeholder with the name used for your organization's private repository within the Chainguard registry.

Compatibility Notes

chainguard-base-fips is the FIPS version of our chainguard-base image. Like the regular chainguard-base image, it is comparable to other common base images, like alpine, debian, or ubuntu, with the following differences:

  • Like all other Chainguard Images, chainguard-base-fips features a stripped down, minimal design
  • This base image comes with apk and BusyBox and reports as being a Chainguard image.
  • It has few-to-zero CVEs
  • It does not run as the root user

Most importantly, the chainguard-base-fips image contains the OpenSSL FIPS Provider Module (CMVP #4282).

About FIPS Images

FIPS (short for Federal Information Processing Standards) are standards developed by the National Institute of Standards and Technology (NIST) in accordance with the Federal Information Security Management Act (FISMA) and approved by the Secretary of Commerce. FIPS compliance ensures that cryptographic security services within applications meet strict security and integrity standards, and are implemented and configured correctly.

Chainguard offers a variety of language-specific FIPS Images configured out of the box for FIPS development in a given language. We also offer a number base FIPS images for specific applications, such as PostgreSQL, Elasticsearch, and nginx.

Be aware that if you run apk add to install a package onto a Chainguard FIPS Image, there's no guarantee that these packages will function properly; they may throw errors if the package has certain dependencies that aren't available in the image. Additionally, even if they do function properly there's no guarantee that added packages will use FIPS-validated cryptography.

Please refer to Chainguard's FIPS Commitment for more information.

Getting Started

The chainguard-base-fips image includes a shell and package manager, making it useful for installing an application’s OS-level dependencies. The image will start in a shell by default:

docker run -it cgr.dev/ORGANIZATION/chainguard-base-fips
9f5a09772f0f:/#

You can run commands from within the shell like this, or you can run commands directly on your local machine without opening a shell:

docker run cgr.dev/ORGANIZATION/chainguard-base-fips ps
PID   USER 	TIME  COMMAND
	1 root  	0:00 ps

chainguard-base-fips is commonly used in Dockerfiles, as in the following example:

FROM cgr.dev/ORGANIZATION/chainguard-base-fips

RUN apk update && apk add redis

ENTRYPOINT ["/usr/bin/redis-server"]

This example Dockerfile will update apk and install the Redis server onto the base image.

You could use a Dockerfile like this to build a new image:

docker build -t myredis-fips --progress plain --no-cache .
#0 building with "default" instance using docker driver

#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 162B done
#1 DONE 0.0s

#2 [internal] load metadata for cgr.dev/ORGANIZATION/chainguard-base-fips:latest
#2 DONE 0.0s

#3 [internal] load .dockerignore
#3 transferring context: 48B done
#3 DONE 0.0s

#4 [1/2] FROM cgr.dev/ORGANIZATION/chainguard-base-fips:latest
#4 CACHED

#5 [2/2] RUN apk update && apk add redis
#5 0.130 fetch https://packages.cgr.dev/extras/x86_64/APKINDEX.tar.gz
#5 5.741 fetch https://packages.wolfi.dev/os/x86_64/APKINDEX.tar.gz
#5 6.860  [https://packages.cgr.dev/extras]
#5 6.860  [https://packages.wolfi.dev/os]
#5 6.860 OK: 99768 distinct packages available
#5 7.224 (1/5) Installing ncurses-terminfo-base (6.5_p20241006-r4)
#5 7.407 (2/5) Installing ncurses (6.5_p20241006-r4)
#5 7.626 (3/5) Installing bash (5.2.37-r2)
#5 7.854 (4/5) Installing posix-libc-utils (2.40-r3)
#5 8.128 (5/5) Installing redis-7.4 (7.4.1-r0)
#5 8.579 Executing glibc-2.40-r3.trigger
#5 8.618 Executing busybox-1.37.0-r0.trigger
#5 8.623 OK: 23 MiB in 24 packages
#5 DONE 8.7s

#6 exporting to image
#6 exporting layers 0.0s done
#6 writing image sha256:d238ef34e477c11aef56793c3c4a6ea436a06f53d258e606fa14e42c321ba1bf done
#6 naming to docker.io/library/myredis-fips done
#6 DONE 0.1s

Following that, you can run the new image built from the chainguard-base-fips image.

docker run myredis-fips

Configuration

The chainguard-base-fips image uses the ash shell from BusyBox by default.

If you need to port a bash and Debian centric entrypoint script to Chainguard Images, you can update your scripts to work in ash. Alternatively, you can install the shell that works with your scripts.

For example:

docker run -it cgr.dev/ORGANIZATION/chainguard-base-fips
85660a3cca6d:/# echo {1..5}
{1..5}

85660a3cca6d:/# apk add bash
fetch https://packages.cgr.dev/extras/x86_64/APKINDEX.tar.gz
fetch https://packages.wolfi.dev/os/x86_64/APKINDEX.tar.gz
(1/3) Installing ncurses-terminfo-base (6.5_p20241006-r4)
(2/3) Installing ncurses (6.5_p20241006-r4)
(3/3) Installing bash (5.2.37-r2)
Executing glibc-2.40-r3.trigger
Executing busybox-1.37.0-r0.trigger
OK: 19 MiB in 22 packages

85660a3cca6d:/# bash

85660a3cca6d:/# echo {1..5}
1 2 3 4 5

85660a3cca6d:/#

Oftentimes, you’ll need to install extra utilities to provide required dependencies for applications and scripts. These dependencies are likely to have different package names compared to other Linux distributions, so the apk search command can be very useful for finding the package you need.

For example, say you are porting a Dockerfile that uses the groupadd command. You could convert this to the BusyBox addgroup equivalent, but it’s also perfectly fine to add the groupadd utility. The only issue is that there’s no groupadd package, so you will have to search for it:

85660a3cca6d:/# groupadd
/bin/sh: groupadd: not found

85660a3cca6d:/# apk add groupadd
ERROR: unable to select packages:
  groupadd (no such package):
	required by: world[groupadd]

85660a3cca6d:/# apk update
fetch https://packages.cgr.dev/extras/x86_64/APKINDEX.tar.gz
fetch https://packages.wolfi.dev/os/x86_64/APKINDEX.tar.gz
 [https://packages.cgr.dev/extras]
 [https://packages.wolfi.dev/os]

e9804f9b1ca9:/# apk search groupadd
shadow-4.16.0-r2

85660a3cca6d:/# apk add shadow
(1/4) Installing libmd (1.1.0-r2)
(2/4) Installing libbsd (0.12.2-r1)
(3/4) Installing linux-pam (1.7.0-r2)
(4/4) Installing shadow (4.16.0-r2)
Executing glibc-2.40-r3.trigger
Executing busybox-1.37.0-r0.trigger
OK: 22 MiB in 23 packages

85660a3cca6d:/# groupadd
Usage: groupadd [options] GROUP

Options:
  -f, --force               	exit successfully if the group already exists,
                            	and cancel -g if the GID is already used
  -g, --gid GID             	use GID for the new group
  -h, --help                	display this help message and exit
  -K, --key KEY=VALUE       	override /etc/login.defs defaults
  -o, --non-unique          	allow to create groups with duplicate
                            	(non-unique) GID
  -p, --password PASSWORD   	use this encrypted password for the new group
  -r, --system              	create a system account
  -R, --root CHROOT_DIR     	directory to chroot into
  -P, --prefix PREFIX_DIR   	directory prefix
  -U, --users USERS         	list of user members of this group

Another useful trick is the cmd: syntax for finding packages that provide commands. For example, searching for ldd returns multiple results:

85660a3cca6d:/# apk search ldd
dpkg-dev-1.22.11-r1
nfs-utils-2.8.1-r1
pax-utils-1.3.8-r0
posix-libc-utils-2.40-r3

But if you use the cmd: syntax it will narrow down the results:

85660a3cca6d:/# apk search cmd:ldd
pax-utils-1.3.8-r0
posix-libc-utils-2.40-r3

You can even use the syntax directly in apk add:

85660a3cca6d:/# apk add cmd:ldd
(1/4) Installing ncurses-terminfo-base (6.5_p20241006-r4)
(2/4) Installing ncurses (6.5_p20241006-r4)
(3/4) Installing bash (5.2.37-r2)
(4/4) Installing posix-libc-utils (2.40-r3)
Executing glibc-2.40-r3.trigger
Executing busybox-1.37.0-r0.trigger
OK: 25 MiB in 27 packages

Documentation and Resources

The following resources provide helpful information on working with Chainguard's base images. Note that some of these resources focus on chainguard-base and wolfi-base — the free-tier alternative to the chainguard-base image — but these same principles and practices apply to chainguard-base-fips.

Contact Support

If you have a Zendesk account (typically set up for you by your Customer Success Manager) you can reach out to Chainguard's Customer Success team through our Zendesk portal.

What are Chainguard Images?

Chainguard Images are a collection of container images designed for security and minimalism.

Many Chainguard Images are distroless; they contain only an open-source application and its runtime dependencies. These images do not even contain a shell or package manager. Chainguard Images are built with Wolfi, our Linux undistro designed to produce container images that meet the requirements of a secure software supply chain.

The main features of Chainguard Images include:

-dev Variants

As mentioned previously, Chainguard’s distroless Images have no shell or package manager by default. This is great for security, but sometimes you need these things, especially in builder images. For those cases, most (but not all) Chainguard Images come paired with a -dev variant which does include a shell and package manager.

Although the -dev image variants have similar security features as their distroless versions, such as complete SBOMs and signatures, they feature additional software that is typically not necessary in production environments. The general recommendation is to use the -dev variants only to build the application and then copy all application artifacts into a distroless image, which will result in a final container image that has a minimal attack surface and won’t allow package installations or logins.

That being said, it’s worth noting that -dev variants of Chainguard Images are completely fine to run in production environments. After all, the -dev variants are still more secure than many popular container images based on fully-featured operating systems such as Debian and Ubuntu since they carry less software, follow a more frequent patch cadence, and offer attestations for what they include.

Learn More

To better understand how to work with Chainguard Images, we encourage you to visit Chainguard Academy, our documentation and education platform.

Licenses

Chainguard Images contain software packages that are direct or transitive dependencies. The following licenses were found in the "latest" version of this image:

  • Apache-2.0

  • GCC-exception-3.1

  • GPL-2.0-only

  • GPL-2.0-or-later

  • GPL-3.0-or-later

  • LGPL-2.1-or-later

  • MIT

For a complete list of licenses, please refer to this Image's SBOM.

Software license agreement

Compliance

This 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 STIGs

Related images

Category
FIPS
STIG
base

Safe Source for Open Sourceâ„¢
Media KitContact Us
© 2024 Chainguard. All Rights Reserved.
Private PolicyTerms of Use

Product

Chainguard Images