File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Enable FIPS
2+ kargs = [" fips=1" ]
Original file line number Diff line number Diff line change @@ -141,6 +141,18 @@ RUN /var/tmp/rhsm-script.sh && \
141141 (subscription-manager unregister || true) && \
142142 systemctl enable $ENABLE_UNITS
143143
144+
145+ # Configure FIPS
146+ ARG FIPS=1
147+ RUN if [ "${FIPS}" = "1" ] ; \
148+ then \
149+ # Enable the FIPS crypto policy
150+ update-crypto-policies --no-reload --set FIPS ; \
151+ touch /etc/system-fips ; \
152+ mkdir -p /usr/lib/bootc/kargs.d ; \
153+ echo -e "# Enable FIPS\n kargs = [\" fips=1\" ]\n " > /usr/lib/bootc/kargs.d/01-fips.toml ; \
154+ fi
155+
144156# Drop Ansible fact into place
145157COPY ansible-facts/bootc.fact /etc/ansible/facts.d/bootc.fact
146158RUN chmod +x /etc/ansible/facts.d/bootc.fact
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ EDPM_QCOW2_IMAGE ?= ${EDPM_BOOTC_REPO}:${EDPM_BOOTC_TAG}-qcow2
88BUILDER_IMAGE ?= quay.io/centos-bootc/bootc-image-builder:latest
99HOST_PACKAGES ?= podman osbuild-selinux https://download.devel.redhat.com/rcm-guest/puddles/OpenStack/rhos-release/rhos-release-latest.noarch.rpm
1010RHSM_SCRIPT ?= empty.sh
11+ FIPS ?= 1
1112
1213.ONESHELL :
1314
@@ -33,6 +34,7 @@ build: output/yum.repos.d
3334 sudo buildah bud \
3435 --build-arg EDPM_BASE_IMAGE=${EDPM_BASE_IMAGE} \
3536 --build-arg RHSM_SCRIPT=${RHSM_SCRIPT} \
37+ --build-arg FIPS=${FIPS} \
3638 --volume /etc/pki/ca-trust:/etc/pki/ca-trust:ro,Z \
3739 --volume $(shell pwd) /output/yum.repos.d:/etc/yum.repos.d:rw,Z \
3840 -f ${EDPM_CONTAINERFILE} \
You can’t perform that action at this time.
0 commit comments