Linux本地重装docker

1、yum update检查

如果出现Loaded plugins: fastestmirror, langpacks

修改配置文件

1.修改插件配置文件

[root@bogon minus]# vim  /etc/yum/pluginconf.d/fastestmirror.conf

[main]
enabled=0   //由 1 改成0 ,禁用该插件
verbose=0
always_print_best_host = true
socket_timeout=3
#  Relative paths are relative to the cachedir (and so works for users as well
# as root).
hostfilepath=timedhosts.txt
maxhostfileage=10
maxthreads=15
#exclude=.gov, facebook
#include_only=.nl,.de,.uk,.ie

2.修改yum 配置文件

[root@minus]# vim /etc/yum.conf

9 plugins=0  //不使用插件

3. 清除缓存并重新构建yum 源

[root@localhost yum.repos.d]# yum clean all
出现Cleaning repos: base extras updates
[root@localhost yum.repos.d]# yum makecache
等待进度条

Step 1: 安装必要的一些系统工具

sudo yum install -y yum-utils device-mapper-persistent-data lvm2

Step 2: 添加软件源信息

sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

Step 3: 更新yum索引列表并安装Docker引擎

sudo yum makecache fast

yum索引列表没有更新可以直接使用yum makecache

sudo yum install docker-ce

安装过程中会提示确认,输入y以确认。

Step 4: 开启Docker服务

sudo service docker start

docker下载慢问题:

nano /etc/docker/daemon.json
文件里面写这个json
{
//在阿里云中镜像加速器里面复制黏贴进来
}

重启docker
systemctl daemon-reload
systemctl restart docker

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值