树莓派Raspberry Pi安装docker

sudo apt-get update

sudo apt-get install \
     apt-transport-https \
     ca-certificates \
     curl \
     gnupg2 \
     lsb-release \
     software-properties-common
#国内软件源
 curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/raspbian/gpg | sudo apt-key add -


# 官方源
 curl -fsSL https://download.docker.com/linux/raspbian/gpg | sudo apt-key add -
#sources.list 中添加 Docker 软件源
sudo add-apt-repository \
    "deb [arch=armhf] https://mirrors.aliyun.com/docker-ce/linux/raspbian \
    $(lsb_release -cs) \
    stable"
    
sudo apt-get update

sudo apt-get install docker-ce

#可能会出现安装失败提示,按提示加上 --disable xxxx的
#启动docker
sudo systemctl enable docker
sudo systemctl start docker