美文网首页
docker安装

docker安装

作者: Then丶 | 来源:发表于2020-06-06 18:12 被阅读0次

2020-6-6正常

uname -a
>=2.6.32-431


1、先备份
sudo mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
2、更换源
sudo wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum install -y yum-utils device-mapper-persistent-data lvm2
yum makecache fast
yum -y install docker

启动Dcoker服务
systemctl start docker

开机自启
systemctl enable docker


配置加速

mkdir -p /etc/docker
vim /etc/docker/daemon.json
{
        "registry-mirrors": [
        "https://1nj0zren.mirror.aliyuncs.com",
        "https://docker.mirrors.ustc.edu.cn",
        "https://hub-mirror.c.163.com"
        ]
}

systemctl daemon-reload
systemctl restart docker


test

docker pull hello-world
docker run hello-world

https://blog.csdn.net/IronmanJay/article/details/104677814
https://mp.weixin.qq.com/s/iAZ1bM9SaaoKWpzjKAODQw

相关文章

网友评论

      本文标题:docker安装

      本文链接:https://www.haomeiwen.com/subject/voqazhtx.html