alpine-docker.sh 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. #!/usr/bin/env bash
  2. source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func)
  3. # Copyright (c) 2021-2023 tteck
  4. # Author: tteck (tteckster)
  5. # License: MIT
  6. # https://github.com/tteck/Proxmox/raw/main/LICENSE
  7. function header_info {
  8. clear
  9. cat <<"EOF"
  10. ____ __
  11. / __ \____ _____/ /_ __ _____
  12. / / / / __ \/ ___/ //_/ _ \/ ___/
  13. / /_/ / /_/ / /__/ ,< / __/ /
  14. /_____/\____/\___/_/|_|\___/_/
  15. Alpine
  16. EOF
  17. }
  18. header_info
  19. echo -e "Loading..."
  20. APP="Alpine-Docker"
  21. var_disk="2"
  22. var_cpu="1"
  23. var_ram="1024"
  24. var_os="alpine"
  25. var_version="3.18"
  26. variables
  27. color
  28. catch_errors
  29. function default_settings() {
  30. CT_TYPE="1"
  31. PW=""
  32. CT_ID=$NEXTID
  33. HN=$NSAPP
  34. DISK_SIZE="$var_disk"
  35. CORE_COUNT="$var_cpu"
  36. RAM_SIZE="$var_ram"
  37. BRG="vmbr0"
  38. NET="dhcp"
  39. GATE=""
  40. DISABLEIP6="no"
  41. MTU=""
  42. SD=""
  43. NS=""
  44. MAC=""
  45. VLAN=""
  46. SSH="no"
  47. VERB="no"
  48. echo_default
  49. }
  50. function update_script() {
  51. if ! apk -e info newt >/dev/null 2>&1; then
  52. apk add -q newt
  53. fi
  54. while true; do
  55. CHOICE=$(
  56. whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --menu "Select option" 11 58 1 \
  57. "1" "Check for Docker Updates" 3>&2 2>&1 1>&3
  58. )
  59. exit_status=$?
  60. if [ $exit_status == 1 ]; then
  61. clear
  62. exit-script
  63. fi
  64. header_info
  65. case $CHOICE in
  66. 1)
  67. apk update && apk upgrade
  68. exit
  69. ;;
  70. esac
  71. done
  72. }
  73. start
  74. build_container
  75. description
  76. msg_ok "Completed Successfully!\n"