Update docker.sh

This commit is contained in:
tteckster 2022-03-17 07:48:38 -04:00 committed by GitHub
parent eccdf3ab1c
commit ea623d1708
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 8 deletions

View File

@ -137,13 +137,13 @@ while [ $opt != '' ]
1) clear; 1) clear;
header_info; header_info;
option_picked "Using fuse-overlayfs Storage Driver"; option_picked "Using fuse-overlayfs Storage Driver";
SD=" " STORAGE_DRIVER="fuse"
break; break;
;; ;;
2) clear; 2) clear;
header_info; header_info;
option_picked "Using overlay2fs Storage Driver"; option_picked "Using overlay2fs Storage Driver";
SD="# " STORAGE_DRIVER=" "
break; break;
;; ;;
@ -206,7 +206,7 @@ function cleanup() {
rm -rf $TEMP_DIR rm -rf $TEMP_DIR
} }
if [ "$IM" == "1" ]; then if [ "$IM" == "1" ]; then
FEATURES="nesting=1,keyctl=1,mknod=1" FEATURES="nesting=1,keyctl=1"
else else
FEATURES="nesting=1" FEATURES="nesting=1"
fi fi
@ -231,8 +231,8 @@ export PCT_OPTIONS="
bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit
STORAGE_TYPE=$(pvesm status -storage $(pct config $CTID | grep rootfs | awk -F ":" '{print $2}') | awk 'NR>1 {print $2}') STORAGE_TYPE=$(pvesm status -storage $(pct config $CTID | grep rootfs | awk -F ":" '{print $2}') | awk 'NR>1 {print $2}')
if [ "$STORAGE_TYPE" == "zfspool" ]; then if [ "$STORAGE_TYPE" == "zfspool" ] && [ "$STORAGE_DRIVER" == "fuse" ]; then
${SD}wget -qL -O fuse-overlayfs https://github.com/containers/fuse-overlayfs/releases/download/v1.8.2/fuse-overlayfs-x86_64 wget -qL -O fuse-overlayfs https://github.com/containers/fuse-overlayfs/releases/download/v1.8.2/fuse-overlayfs-x86_64
warn "Some addons may not work due to ZFS not supporting 'fallocate'." warn "Some addons may not work due to ZFS not supporting 'fallocate'."
fi fi
LXC_CONFIG=/etc/pve/lxc/${CTID}.conf LXC_CONFIG=/etc/pve/lxc/${CTID}.conf
@ -243,9 +243,9 @@ EOF
echo -en "${GN} Starting LXC Container... " echo -en "${GN} Starting LXC Container... "
pct start $CTID pct start $CTID
if [ "$STORAGE_TYPE" == "zfspool" ]; then if [ "$STORAGE_TYPE" == "zfspool" ] && [ "$STORAGE_DRIVER" == "fuse" ]; then
${SD}pct push $CTID fuse-overlayfs /usr/local/bin/fuse-overlayfs -perms 755 pct push $CTID fuse-overlayfs /usr/local/bin/fuse-overlayfs -perms 755
${SD}info "${BL}Using fuse-overlayfs.${CL}" info "${BL}Using fuse-overlayfs.${CL}"
fi fi
echo -e "${CM}${CL} \r" echo -e "${CM}${CL} \r"