docker安装部署
一、条件1:Linux内核版本为3.10及以上,centos在7.5版本及以上
(查看linux内核版本:uname -r)
(查看centos版本cat /etc/redhat-release)
二、条件2:虚拟机必须能连到外网
关闭防火墙:
systemctl status firewalld(查看状态)
systemctl stop firewalld(暂时)
systemctl disable firewalld(永久)
systemctl enable firewalld(重启))
三、安装步骤
yum install -y docker
vi /usr/lib/systemd/system/docker.service(配置镜像)
systemctl stop docker
systemctl daemon-reload
systemctl restart docker(重启docker)
docker pull 镜像(拉镜像)
docker images(查看镜像)
docker rmi 镜像id(删除镜像)
docker version #查看版本
四、验证是按装否成功(lasted最新版本)
docker run hello-world #下载hello-world镜像并运行
五、镜像加速
1.使用阿里云镜像加速(镜像仓库)
2.查看自己的专属加速器地址
3.配置/e