第 5 章 Best practices for running containers by using local sources
You can access content hosted in an internal registry that requires a custom Transport Layer Security (TLS) root certificate, when running RHEL bootc images.
To install content to a container by using only local resources, you can use one of the following options:
- Bind mounts: Override the container’s store with the host’s.
-
Derived image: Create a new container image with your custom certificates by building it using a
Containerfile.
You can use the same techniques to run a bootc-image-builder container or a bootc container when appropriate.
Use bound mounts to override the container’s store with the host’s.
Procedure
Run a bootc-image-builder and use a bind mount, for example
-v /etc/pki:/etc/pki, to override the container’s store with the host’s:# podman run \ --rm \ -it \ --privileged \ --pull=newer \ --security-opt label=type:unconfined_t \ -v ./output:/output \ -v /etc/pki:/etc/pki \ registry.redhat.io/rhel10/bootc-image-builder:latest \ --type iso \ --config /config.toml \ quay.io/<namespace>/<image>:<tag>
Verification
- The disk image build process should now be able to access internal certificates.