-
-
Notifications
You must be signed in to change notification settings - Fork 573
Expand file tree
/
Copy pathinstall_docker_ubuntu.sh
More file actions
executable file
·28 lines (23 loc) · 811 Bytes
/
install_docker_ubuntu.sh
File metadata and controls
executable file
·28 lines (23 loc) · 811 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
#! /bin/bash
if [ "$EUID" -ne 0 ]
then echo "[-] Please run as root"
exit
fi
# install the required services, pull docker the right docker for debian
apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
chmod a+r /etc/apt/keyrings/docker.asc
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] \
https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable" > /etc/apt/sources.list.d/docker.list
apt-get update
#apt-get install -y docker-ce docker-ce-cli containerd.io
apt-get install -y --no-install-recommends docker-ce docker-compose-plugin