-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathinstall_requirements.sh
More file actions
executable file
·55 lines (46 loc) · 1.1 KB
/
install_requirements.sh
File metadata and controls
executable file
·55 lines (46 loc) · 1.1 KB
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
#!/usr/bin/env sh
# Distribution detection
if [ -f /etc/os-release ]; then
. /etc/os-release
OS=$ID
else
echo "Impossible de détecter la distribution."
exit 1
fi
###############################################################################
# Distribution installation
###############################################################################
install_ubuntu() {
sudo apt-get update
sudo apt-get install -y git curl xz-utils docker.io docker-compose-v2 just
systemctl enable docker
systemctl start docker
}
install_arch() {
sudo pacman -Sy --noconfirm git curl xz docker docker-compose just
systemctl enable docker
systemctl start docker
}
install_alpine() {
apk add --no-cache bash sudo openrc git curl xz docker docker-compose just
rc-update add docker boot
service docker start
}
###############################################################################
# Main
###############################################################################
case "$OS" in
ubuntu)
install_ubuntu
;;
arch)
install_arch
;;
alpine)
install_alpine
;;
*)
echo "Not suported distribution"
exit 1
;;
esac