-
Notifications
You must be signed in to change notification settings - Fork 0
/
steps-12-docker
executable file
·36 lines (26 loc) · 1.23 KB
/
steps-12-docker
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
#!/usr/bin/env sh
# Via: https://docs.docker.com/engine/install/ubuntu/
set -e
# Naujame OSe nebuvo jokių paketų, nereikėjo ir išmest:
# sudo apt-get remove docker docker-engine docker.io containerd runc
sudo apt-get update
sudo apt-get install -y \
ca-certificates \
curl \
gnupg \
lsb-release
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor --yes -o /etc/apt/keyrings/docker.gpg
. /etc/os-release
cat << \
------------------------------------------------------------------------------------------------------------------------------------------------- |
deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $UBUNTU_CODENAME stable
-------------------------------------------------------------------------------------------------------------------------------------------------
sudo tee /etc/apt/sources.list.d/docker.list
sudo apt-get update
sudo apt-get -y install docker-ce docker-ce-cli containerd.io docker-compose-plugin
# Pakilo ir be šito:
# sudo service docker start
sudo docker run hello-world | grep --color .
sudo usermod -aG docker $USER
echo "You're added to Docker group, please relogin"