12.3. Injecting kernel arguments in the Containerfile
To add kernel arguments into a container image, use a Containerfile. The following is an example:
FROM registry.redhat.io/rhel10/rhel-bootc:latest
RUN mkdir -p /usr/lib/bootc/kargs.d
RUN cat <<EOF >> /usr/lib/bootc/kargs.d/console.toml
kargs = ["console=ttyS0,115200n8"]
match-architectures = ["x86_64"]
EOF
RUN cat <<EOF >> /usr/lib/bootc/kargs.d/01-mitigations.toml
kargs = ["mitigations=on", "systemd.unified_cgroup_hierarchy=0"]
match-architectures = ["x86_64", "aarch64"]
EOF