rpi64安装docker

概览:

Install

reference:

Get Docker Engine - Community for Debian

Uninstall old versions

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Uninstall old versions
sudo apt remove docker docker-engine docker.io containerd runc
# Install dependence
sudo apt update
sudo apt install apt-transport-https ca-certificates curl gnupg2 software-properties-common
# Add Docker’s official GPG key:
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
# Verify that you now have the key with the fingerprint `9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88`, by searching for the last 8 characters of the fingerprint.
sudo apt-key fingerprint 0EBFCD88
# output like this.
#pub 4096R/0EBFCD88 2017-02-22
# Key fingerprint = 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88
#uid Docker Release (CE deb) <docker@docker.com>
#sub 4096R/F273FCD8 2017-02-22

sudo add-apt-repository \
"deb [arch=arm64] https://download.docker.com/linux/debian \
$(lsb_release -cs) \
stable"

sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io
  • 授权普通使用
1
sudo gpasswd -a ${USER} docker

调整防火墙

在官方64位新版本系统中,好像防火墙这个问题没有出现了。

Q

1
2
guzal@GuzalAida:~$ sudo iptables -nvL
iptables: Operation not supported.

A

1
2
3
4
5
6
7
8
9
10
11
guzal@GuzalAida:~$ sudo update-alternatives --config iptables
There are 2 choices for the alternative iptables (providing /usr/sbin/iptables).

Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/sbin/iptables-nft 20 auto mode
1 /usr/sbin/iptables-legacy 10 manual mode
2 /usr/sbin/iptables-nft 20 manual mode

Press <enter> to keep the current choice[*], or type selection number: 1
update-alternatives: using /usr/sbin/iptables-legacy to provide /usr/sbin/iptables (iptables) in manual mode