Update build.func

This commit is contained in:
CanbiZ 2025-12-04 15:19:58 +01:00
parent 4ed0fa9697
commit 4a6f783ddb

View File

@ -2391,28 +2391,39 @@ build_container() {
none) ;; none) ;;
esac esac
# Build FEATURES string based on container type and settings # Build FEATURES string
FEATURES="nesting=1" if [ "$CT_TYPE" == "1" ]; then
FEATURES="keyctl=1,nesting=1"
# keyctl: required for Docker in unprivileged containers else
if [ "$CT_TYPE" == "1" ] || [ "${ENABLE_KEYCTL:-0}" == "1" ]; then FEATURES="nesting=1"
FEATURES="$FEATURES,keyctl=1"
fi fi
# fuse: allow FUSE filesystems
if [ "$ENABLE_FUSE" == "yes" ]; then if [ "$ENABLE_FUSE" == "yes" ]; then
FEATURES="$FEATURES,fuse=1" FEATURES="$FEATURES,fuse=1"
fi fi
# mknod: allow device node creation (kernel 5.3+, experimental) # # Build FEATURES string based on container type and settings
if [ "${ENABLE_MKNOD:-0}" == "1" ]; then # FEATURES="nesting=1"
FEATURES="$FEATURES,mknod=1"
fi
# mount: allow specific filesystem types # # keyctl: required for Docker in unprivileged containers
if [ -n "${MOUNT_FS:-}" ]; then # if [ "$CT_TYPE" == "1" ] || [ "${ENABLE_KEYCTL:-0}" == "1" ]; then
FEATURES="$FEATURES,mount=$MOUNT_FS" # FEATURES="$FEATURES,keyctl=1"
fi # fi
# # fuse: allow FUSE filesystems
# if [ "$ENABLE_FUSE" == "yes" ]; then
# FEATURES="$FEATURES,fuse=1"
# fi
# # mknod: allow device node creation (kernel 5.3+, experimental)
# if [ "${ENABLE_MKNOD:-0}" == "1" ]; then
# FEATURES="$FEATURES,mknod=1"
# fi
# # mount: allow specific filesystem types
# if [ -n "${MOUNT_FS:-}" ]; then
# FEATURES="$FEATURES,mount=$MOUNT_FS"
# fi
# NEW IMPLEMENTATION (Fixed): Build PCT_OPTIONS properly # NEW IMPLEMENTATION (Fixed): Build PCT_OPTIONS properly
# Key insight: Bash cannot export arrays, so we build the options as a string # Key insight: Bash cannot export arrays, so we build the options as a string