Files
os-init/alpine/apps/docker/docker.sh
2025-11-01 22:10:35 +01:00

38 lines
832 B
Bash

#!/bin/dash
BASE_URL=${1}
mkdir /srv/stacks
mkdir /srv/data
sed -i '/\/community/s/^#//g' /etc/apk/repositories
apk update
apk add docker docker-cli-compose
# sysctl -w net/netfilter/nf_conntrack_max=131072
rc-update add docker boot
service docker start
InstStacks() {
SEL=$(whiptail --title "More Apps" --checklist "" 0 0 0 \
"portainer" "" off 3>&1 1>&2 2>&3)
#SEL=$(whiptail --title "More Apps" --checklist "" 0 0 0 \
# "portainer" "" off \
# "traefik" "" off \
# "gitea" "" off 3>&1 1>&2 2>&3)
# shellcheck disable=SC2181
if [ "${?}" = "0" ]; then
for ITM in ${SEL}; do
cd /tmp || exit
# shellcheck disable=SC3000-SC4000
wget "${BASE_URL}"/alpine/apps/docker/stacks/"${ITM//\"/}"/"${ITM//\"/}".sh
# shellcheck disable=SC3000-SC4000
sh ./"${ITM//\"/}".sh "${BASE_URL}"
done
fi
}
InstStacks