-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall.sh
62 lines (55 loc) · 2 KB
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/bin/sh
#Set up the required package
echo "Running apt update, installing dependencies"
sudo apt update
pkgs='curl uidmap apt-transport-https ca-certificates gnupg lsb-release'
if ! dpkg -s $pkgs >/dev/null 2>&1; then
sudo apt-get install -y $pkgs
fi
pkgs='deck'
if ! dpkg -s $pkgs >/dev/null 2>&1; then
wget https://github.com/sfx101/deck/releases/download/v3.0.0/DECK-3.0.0-amd64.deb
sudo dpkg -i DECK-3.0.0-amd64.deb
fi
#If you installed Docker 20.10 or later without RPM/DEB packages, you should have
echo "Configuring docker rootless access";
curl -fsSL https://get.docker.com/rootless | sh
export PATH=/home/$USER/bin:$PATH
export DOCKER_HOST=unix:///run/user/$USER/docker.sock
systemctl --user enable docker && sudo loginctl enable-linger $(whoami)
#Docker gpg add
FILE=/usr/share/keyrings/docker-archive-keyring.gpg
if [ -f "$FILE" ]; then
echo "$FILE exists"
else
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
fi
#Set up the stable repository.
echo \
"deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
#Install Docker Engine
pkgs='docker-ce docker-ce-cli containerd.io'
if ! dpkg -s $pkgs >/dev/null 2>&1; then
sudo apt-get install -y $pkgs
fi
#List the versions available in your repo
apt-cache madison docker-ce
sudo usermod -aG docker $USER
echo "Staring docker";
systemctl --user start docker
systemctl --user enable docker
sudo loginctl enable-linger $(whoami)
#Install docker-compose, neofetch
pkgs='docker-compose neofetch'
if ! dpkg -s $pkgs >/dev/null 2>&1; then
sudo apt-get install -y $pkgs
fi
sudo setcap 'cap_net_bind_service=+eip' /opt/DECK/deck
sudo sh -c "echo '/opt/DECK/' >> /etc/ld.so.conf.d/deck.conf"
sudo ldconfig
echo "sudo chmod 664 /var/run/docker.sock";
systemctl start docker
sudo chmod 666 /var/run/docker.sock
neofetch
echo "All set and done.";