-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdebianServerScript.sh
20 lines (20 loc) · 999 Bytes
/
debianServerScript.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh
sudo apt update -y
sudo apt upgrade -y
sudo apt install neofetch htop ca-certificates curl gnupg powertop -y
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
echo \
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update -y
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo systemctl start docker
sudo systemctl enable docker
sudo groupadd docker
sudo usermod -aG docker $USER
sudo docker volume create yacht
sudo docker run -d -p 8000:8000 -v --name yacht --restart unless-stopped /var/run/docker.sock:/var/run/docker.sock -v yacht:/config selfhostedpro/yacht
sudo shutdown