-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprovision.sh
32 lines (25 loc) · 1.04 KB
/
provision.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
#!/bin/bash
export DEBIAN_FRONTEND=noninteractive
sudo apt update && sudo apt upgrade && sudo apt install -y \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
echo "Installing Docker’s official GPG key"
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
echo "Setting up Docker stable repository"
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
echo "Installing Docker engine"
sudo apt-get update
sudo apt-get install -y docker-ce
echo "Restarting Docker engine"
systemctl restart docker
echo "Confirming Docker is running"
sudo docker run hello-world
echo "Installing docker-compose"
sudo curl -L https://github.com/docker/compose/releases/download/1.24.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose --version
echo "Run container IoT cloud services"
docker-compose -f /var/www/cloud_gateway/docker/docker-compose.yml up -d