53 lines
1.9 KiB
Plaintext
53 lines
1.9 KiB
Plaintext
|
startup=0
|
||
|
gpu_passthrough_intel=0
|
||
|
gpu_passthrough_nvidia=0
|
||
|
|
||
|
# Use macvlan networking to provide an isolated network namespace,
|
||
|
# so podman can manage firewall rules
|
||
|
# Alternatively use --network-bridge=br1 instead of --network-macvlan
|
||
|
# Ensure to change eno1/br1 to the interface name you want to use
|
||
|
# You may want to add additional options here, e.g. bind mounts
|
||
|
systemd_nspawn_user_args=--network-macvlan=eno1
|
||
|
--resolv-conf=bind-host
|
||
|
--system-call-filter='add_key keyctl bpf'
|
||
|
|
||
|
# Script to run on the HOST before starting the jail
|
||
|
# Load kernel module and config kernel settings required for podman
|
||
|
pre_start_hook=#!/usr/bin/bash
|
||
|
echo 'PRE_START_HOOK'
|
||
|
echo 1 > /proc/sys/net/ipv4/ip_forward
|
||
|
modprobe br_netfilter
|
||
|
echo 1 > /proc/sys/net/bridge/bridge-nf-call-iptables
|
||
|
echo 1 > /proc/sys/net/bridge/bridge-nf-call-ip6tables
|
||
|
|
||
|
# Install podman inside the jail
|
||
|
# NOTE: this script will run in the host networking namespace and ignores
|
||
|
# all systemd_nspawn_user_args such as bind mounts
|
||
|
|
||
|
initial_setup=#!/usr/bin/bash
|
||
|
set -euo pipefail
|
||
|
dnf -y install podman
|
||
|
# Add the required capabilities to the `newuidmap` and `newgidmap` binaries
|
||
|
# https://github.com/containers/podman/issues/2788#issuecomment-1016301663
|
||
|
# https://github.com/containers/podman/issues/12637#issuecomment-996524341
|
||
|
setcap cap_setuid+eip /usr/bin/newuidmap
|
||
|
setcap cap_setgid+eip /usr/bin/newgidmap
|
||
|
|
||
|
# You generally will not need to change the options below
|
||
|
systemd_run_default_args=--property=KillMode=mixed
|
||
|
--property=Type=notify
|
||
|
--property=RestartForceExitStatus=133
|
||
|
--property=SuccessExitStatus=133
|
||
|
--property=Delegate=yes
|
||
|
--property=TasksMax=infinity
|
||
|
--collect
|
||
|
--setenv=SYSTEMD_NSPAWN_LOCK=0
|
||
|
|
||
|
systemd_nspawn_default_args=--keep-unit
|
||
|
--quiet
|
||
|
--boot
|
||
|
--bind-ro=/sys/module
|
||
|
--inaccessible=/sys/module/apparmor
|
||
|
|
||
|
# Used by jlmkr create
|
||
|
initial_rootfs_image=fedora 39
|