Public repo to distribute scripts and config's
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

26 lignes
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