33.5 Alpine Jail
Create the Alpine Jail Base System
# Download the Alpine Linux 3.17.1 minirootfs image
# fetch https://mirrors.ustc.edu.cn/alpine/v3.17/releases/x86_64/alpine-minirootfs-3.17.1-x86_64.tar.gz
# Create the Alpine Jail root directory
# mkdir -p /usr/jails/alpine
# Extract the minirootfs to the Jail root directory
# tar zxf alpine-minirootfs-3.17.1-x86_64.tar.gz -C /usr/jails/alpine/
# Create necessary device nodes
# touch /usr/jails/alpine/dev/shm
# touch /usr/jails/alpine/dev/fdManage Mount Files
devfs /usr/jails/alpine/dev devfs rw 0 0
tmpfs /usr/jails/alpine/dev/shm tmpfs rw,size=1g,mode=1777 0 0
fdescfs /usr/jails/alpine/dev/fd fdescfs rw,linrdlnk 0 0
linprocfs /usr/jails/alpine/proc linprocfs rw 0 0
linsysfs /usr/jails/alpine/sys linsysfs rw 0 0
#/tmp /usr/jails/alpine/tmp nullfs rw 0 0 # Commented out to avoid exposing the entire host /tmp directory to the JailManage the Jail Template
Firewall Network Access
Configure OpenRC for the Base System
Last updated