debian10部署docker

#安装一些必要软件
apt-get -y install apt-transport-https ca-certificates curl software-properties-common gnupg gnupg1 gnupg2
#安装GPG证书
curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/debian/gpg | sudo apt-key add -
#写入软件源信息
add-apt-repository "deb [arch=amd64] https://mirrors.aliyun.com/docker-ce/linux/debian $(lsb_release -cs) stable"
#更新
apt update
#安装最新版docker
apt -y install docker-ce
#配置镜像加速器
mkdir -p /etc/docker
cat > /etc/docker/daemon.json <<EOF
{
"registry-mirrors": ["https://registry.docker-cn.com","http://hub-mirror.c.163.com","https://docker.mirrors.ustc.edu.cn"]
}
EOF

 

posted @ 2021-08-23 15:35  yt丶独自  阅读(415)  评论(0编辑  收藏  举报