0

3.给树莓派安装Docker

 2 years ago
source link: http://muyunyun.cn/blog/RaspberryPi/3.%E7%BB%99%E6%A0%91%E8%8E%93%E6%B4%BE%E5%AE%89%E8%A3%85Docker/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

安装 Docker

sudo apt update
sudo apt install \
apt-transport-https \
ca-certificates \
curl \
gnupg \
lsb-release -y
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
sudo apt install docker-ce=5:20.10.8~3-0~ubuntu-focal docker-ce-cli=5:20.10.9~3-0~ubuntu-focal containerd.io=1.4.11-1 -y

安装 Docker Compose

# 在本机的 host 文件中添加 github 相关 ip 地址,遇到 `curl: (7) Failed to connect to raw.githubusercontent.com port 443` 问题,参考 https://github.com/hawtim/blog/issues/10
sudo vim /etc/hosts
# 使 dns 改动生效
sudo systemctl restart systemd-resolved
sudo curl -L --fail https://raw.githubusercontent.com/linuxserver/docker-docker-compose/master/run.sh -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo docker-compose --version

https://www.v2fy.com/p/2021-10-05-pi-bt-aria2-pro-1633436631000/


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK