forked from clams-tech/clams-app-docker
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathinstall.sh
executable file
·31 lines (20 loc) · 948 Bytes
/
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
#!/bin/bash
set -eu
if [ "$UID" != 0 ]; then
echo "ERROR: this script MUST be run as root."
exit 1
fi
# update
apt update
# needed by scripts
apt install -y jq dnsutils gridsite-clients qrencode wait-for-it imagemagick img2pdf
# the rest is needed for docker to work
apt install -y ca-certificates curl gnupg bc
install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
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/ubuntu "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
apt update
# we need apache2-utils for htpasswd files
apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin apache2-utils
usermod -aG docker "$SUDO_USER"