docker是一个容器,好多服务的安装变得很easy,一条命令即可
docker环境和主机环境隔离,随便玩也玩不坏
树莓派raspbian系统基于debian
因此,树莓派安装docker采用官网debian的教程
pi用户(普通用户)执行:
curl -fsSL https://download.docker.com/linux/debian/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/debian \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io -y
sudo gpasswd -a $USER docker
安装完成后执行
docker run hello-world
能够正常输入hello world,表示安装成功
随后会讲一些基于docker的玩法,相册,智能家居,云盘等
docker环境和主机环境隔离,随便玩也玩不坏
树莓派raspbian系统基于debian
因此,树莓派安装docker采用官网debian的教程
pi用户(普通用户)执行:
curl -fsSL https://download.docker.com/linux/debian/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/debian \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io -y
sudo gpasswd -a $USER docker
安装完成后执行
docker run hello-world
能够正常输入hello world,表示安装成功
随后会讲一些基于docker的玩法,相册,智能家居,云盘等