-
Notifications
You must be signed in to change notification settings - Fork 0
/
v2.sh
36 lines (25 loc) · 901 Bytes
/
v2.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
#!/bin/bash
# Update the apt package index
sudo apt-get update -y
# Install packages to allow apt to use a repository over HTTPS
sudo apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
# Add Docker’s official GPG key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
# Set up the stable repository
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable" -y
# Update the apt package index again
sudo apt-get update -y
# Install the latest version of Docker Engine and containerd
sudo apt-get install -y docker-ce docker-ce-cli containerd.io
# Verify that Docker Engine is installed correctly by running the hello-world image
sudo docker run hello-world
# Enable Docker to start on boot
sudo systemctl enable docker