-
Notifications
You must be signed in to change notification settings - Fork 1
/
install_docker.sh
55 lines (41 loc) · 2.05 KB
/
install_docker.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
#!/bin/bash
echo " ------------------------------------------"
echo " ----------- apt-get update ---------------"
echo " ------------------------------------------"
sudo apt-get update -y
echo " ------------------------------------------"
echo " ----------- dependencies ---------------"
echo " ------------------------------------------"
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common -y
echo " ------------------------------------------"
echo " ------ Docker’s official GPG key ---------"
echo " ------------------------------------------"
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
echo " ------------------------------------------"
echo " ------------ Verification ----------------"
echo " ------------------------------------------"
sudo apt-key fingerprint 0EBFCD88
echo " ------------------------------------------"
echo " ------------ Add Repository --------------"
echo " ------------------------------------------"
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
echo " ------------------------------------------"
echo " ----------- apt-get update ---------------"
echo " ------------------------------------------"
sudo apt-get update -y
echo " ------------------------------------------"
echo " ----------- Install Docker ---------------"
echo " ------------------------------------------"
sudo apt-get install docker-ce -y
echo " ------------------------------------------"
echo " ------- Install Docker Compose -----------"
echo " ------------------------------------------"
sudo touch /usr/bin/docker-compose
sudo chmod 777 /usr/bin/docker-compose
sudo curl -L https://github.com/docker/compose/releases/download/1.11.1/docker-compose-`uname -s`-`uname -m` > /usr/bin/docker-compose
sudo chmod +x /usr/bin/docker-compose
docker-compose --version
echo " ------------------------------------------"
echo " -------- Runing Hello-World --------------"
echo " ------------------------------------------"
sudo docker run hello-world