- Linux在线安装Docker
- 操作系统版本支持,CPU架构支持可以在Docker官文档中查看到;
- docker安装方式有多种,使用一键使用安装是最方便的;
Docker安装一键命令:
curl -fsSL https://get.docker.com -o get-docker.sh && sh ./get-docker.sh
等待命令执行完毕;
测试Docker是否安装完成,查看docker版本
docker version
查看docker服务是否运行:
systemctl status docker
启用docker服务:
systemctl start docker
重启docker服务:
systemctl restart docker
设置开机自动启用docker服务:
systemctl enable docker
禁用开机自动启用docker服务:
systemctl disable docker
Debian11 官方源
cat > /etc/apt/sources.list << EOF
deb http://deb.debian.org/debian/ bullseye main contrib non-free
deb-src http://deb.debian.org/debian/ bullseye main contrib non-free
deb http://deb.debian.org/debian/ bullseye-updates main contrib non-free
deb-src http://deb.debian.org/debian/ bullseye-updates main contrib non-free
deb http://deb.debian.org/debian/ bullseye-backports main contrib non-free
deb-src http://deb.debian.org/debian/ bullseye-backports main contrib non-free
deb http://deb.debian.org/debian-security/ bullseye-security main contrib non-free
deb-src http://deb.debian.org/debian-security/ bullseye-security main contrib non-free
EOF