-
Notifications
You must be signed in to change notification settings - Fork 4
/
install-reqs.sh
executable file
·69 lines (51 loc) · 1.45 KB
/
install-reqs.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
63
64
65
66
67
68
69
#!/bin/bash
# Simple script to install the PERLS architecture requirements
function announce() {
echo ""
echo "#====================================================#"
echo "#"
echo "# Installing $1"
echo "#"
echo "#====================================================#"
}
# Curl
#
announce "Curl"
if ! [ -x "$(command -v curl)" ]; then
# Curl is easy
apt-get install curl
else
echo "Skipping, Curl already installed!"
fi
# Docker
#
announce "Docker"
if ! [ -x "$(command -v docker)" ]; then
# Docker is a bit complicated
#
# Add the GPG Key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
# Add the Docker repository to our APT sources
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
# With those added, update our packages
apt-get update
# Since we're up to date, get docker
apt-get install -y docker-ce
else
echo "Skipping, docker already installed!"
fi
# Docker-Compose
#
announce "Docker-Compose"
if ! [ -x "$(command -v docker-compose)" ]; then
# Docker-Compose is also complicated
#
# Add the GPG Key
curl -L https://github.com/docker/compose/releases/download/1.18.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
# Make sure it's executable
chmod +x /usr/local/bin/docker-compose
else
echo "Skipping, docker-compose already installed!"
fi
echo "Launch server requirements should all be ready."
echo ""