forked from fuzzware-fuzzer/fuzzware
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathubuntu_install_docker.sh
More file actions
executable file
·31 lines (27 loc) · 954 Bytes
/
ubuntu_install_docker.sh
File metadata and controls
executable file
·31 lines (27 loc) · 954 Bytes
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
#!/bin/bash
# Install a recent version of Docker.
# Convenience script following to https://docs.docker.com/engine/install/ubuntu/
OS_NAME="$(awk -F= '/^NAME/{print $2}' /etc/os-release)"
if [ "$OS_NAME" == '"Ubuntu"' ]; then
if [ "$(which docker 2>/dev/null)" = "" ]; then
sudo apt-get update
sudo apt-get -y install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
sudo apt-get install -y docker-ce docker-ce-cli containerd.io
else
echo "Docker already installed. Exiting..."
exit 0
fi
else
echo "Not running on Ubuntu. Exiting..."
exit 1
fi