1.Docker 的安装
apt-get update
apt-get install docker.io
2.查看安装的版本号
docker -v
3.为了解决部分国外镜像因为墙的原因拉取慢可以切换docker下载源为国内镜像站(非必需)
vi /etc/docker/daemon.json
3.1 打开后输入以下内容
{
"registry-mirrors" : [
"http://registry.docker-cn.com",
"http://docker.mirrors.ustc.edu.cn",
"http://hub-mirror.c.163.com"
],
"insecure-registries" : [
"registry.docker-cn.com",
"docker.mirrors.ustc.edu.cn"
],
"debug" : true,
"experimental" : true
}
3.2 然后 :wq 保存后重启 docker
systemctl daemon-reload
systemctl restart docker