Install Docker and Github cli on Ubuntu (21/1/2022)
Source: github cli + dockerโ€‹
1
#!/bin/bash
2
# install docker
3
sudo apt-get update
4
sudo apt-get install \
5
ca-certificates \
6
curl \
7
gnupg \
8
lsb-release
9
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
10
echo \
11
"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
12
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
13
sudo apt-get update
14
sudo apt-get install docker-ce docker-ce-cli containerd.io
15
sudo docker run hello-world
16
โ€‹
17
#install gh (github cli)
18
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key C99B11DEB97541F0
19
sudo apt-add-repository https://cli.github.com/packages
20
sudo apt update
21
sudo apt install gh
22
โ€‹
23
#install pip3
24
sudo apt install python3-pip
25
#install docker-compose
26
pip3 install docker-compose
Copied!
Copy link