Public repo to distribute scripts and config's
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 

26 řádky
1.1 KiB

  1. #!/bin/bash
  2. install_docker() {
  3. echo "Installing Docker"
  4. apt-get install ca-certificates curl gnupg lsb-release -y
  5. curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
  6. echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
  7. apt-get update
  8. apt-get install docker-ce docker-ce-cli containerd.io -y
  9. systemctl start docker
  10. echo "Docker installation completed"
  11. }
  12. install_caddy() {
  13. echo "Installing Caddy"
  14. apt install -y debian-keyring debian-archive-keyring apt-transport-https
  15. curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
  16. curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
  17. apt-get update
  18. apt-get install caddy -y
  19. echo "Caddy installation completed."
  20. }
  21. install_docker
  22. install_caddy