forked from tomekjaworski/DanteCluster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path01_install_docker.sh
executable file
·53 lines (34 loc) · 1004 Bytes
/
01_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
#!/bin/bash
#
set -e
YELLOW='\033[0;33m' # Yellow
NOCOLOR='\033[0m' # No color
function msg () # 1:string
{
echo -e "${YELLOW}$1${NOCOLOR}"
}
#
# Steps taken from Docker Docs:
# https://docs.docker.com/install/linux/docker-ce/debian/
#
clear
msg "Update the apt package index"
apt update
msg "Install packages to allow apt to use a repository over HTTPS"
apt install --yes apt-transport-https curl gnupg2 software-properties-common
msg "Add Docker’s official GPG key"
curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
msg "Verify key with fingerprint 0EBFCD88 and press any key"
apt-key fingerprint 0EBFCD88
echo "Press any key..."
read
# ---------
msg "Set up the stable repository"
msg "lsb_release = $(lsb_release -cs)"
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"
# ----------
msg "nstall docker CE"
apt-get update
apt-get install --yes docker-ce docker-ce-cli containerd.io
msg "DONE"
exit 0