安装docker 遇到的坑

不管输入啥 报错如下

已加载插件:fastestmirror, langpacks, update-motd
Loading mirror speeds from cached hostfile
base                                                                                                                                                       | 3.1 kB  00:00:00
http://mirrors.aliyun.com/docker-ce/linux/centos/2.1903/x86_64/stable/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
正在尝试其它镜像。


 One of the configured repositories failed (Docker CE Stable - x86_64),
 and yum doesn't have enough cached data to continue. At this point the only
 safe thing yum can do is fail. There are a few ways to work "fix" this:

     1. Contact the upstream for the repository and get them to fix the problem.

     2. Reconfigure the baseurl/etc. for the repository, to point to a working
        upstream. This is most often useful if you are using a newer
        distribution release than is supported by the repository (and the
        packages for the previous distribution release still work).

     3. Run the command with the repository temporarily disabled
            yum --disablerepo=docker-ce-stable ...

     4. Disable the repository permanently, so yum won't use it by default. Yum
        will then just ignore the repository until you permanently enable it
        again or use --enablerepo for temporary usage:

            yum-config-manager --disable docker-ce-stable
        or
            subscription-manager repos --disable=docker-ce-stable

     5. Configure the failing repository to be skipped, if it is unavailable.
        Note that yum will try to contact the repo. when it runs most commands,
        so will have to try and fail each time (and thus. yum will be be much
        slower). If it is a very temporary problem though, this is often a nice
        compromise:

            yum-config-manager --save --setopt=docker-ce-stable.skip_if_unavailable=true

failure: repodata/repomd.xml from docker-ce-stable: [Errno 256] No more mirrors to try.
http://mirrors.aliyun.com/docker-ce/linux/centos/2.1903/x86_64/stable/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found

网上博客方案:

博客一:1、yum clean all    2、yum makecache      运行之后,我这问题没解决,还是这样

博客二:1.使用这个 sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo(这是由于国内访问不到docker官方镜像的缘故 
可以通过aliyun的源来完成)

          2. 运行命令安装:sudo yum install docker-ce    结果还是报上处错误

          3.分析原因为:阿里的镜像库文件也指向docker官方库,所以需要修改库文件   sudo vim /etc/yum.repos.d/docker-ce.repo
            通过命令把https://download-stage.docker.com替换为http://mirrors.aliyun.com/docker-ce
            命令如下:
                 :%s#https://download-stage.docker.com#http://mirrors.aliyun.com/docker-ce#g(实际上跟博客二 第一个步骤效果是一样的,所以这个第三步 也不行)

解决方法:

     运行如下命令:

yum-config-manager --save --setopt=docker-ce-stable.skip_if_unavailable=true

解释:上面的意思是  失败就跳过!顶上的报错就是 404 找不到这个东东!!!!找不到啊,那就不要了

 搞定!
 

 

 

  • 1
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
回答: Docker是一个开源的容器化平台,可以实现应用程序的轻量级打包和部署。宝塔面板是一款易用的服务器管理面板,可以帮助用户快速搭建和管理Web服务器。而群晖是一种NAS(Network Attached Storage)产品,可以方便地搭建私有云存储环境。 根据引用内容,如果在群晖上使用Docker安装宝塔面板,可能会遇到一些问题。例如,502报错可能与MySQL数据库服务有关,需要手动启动这些服务。可以通过在shell中运行"bt"命令,选择启动或重启宝塔面板来解决访问失败的问题。 另外,在安装Docker时,需要设置端口转发,包括21、22、80、443、888、8888等端口,因为群晖可能占用了这些端口。同时,还需要设置Docker的SSH密码和自动重新启动功能,以提高容器的稳定性。 总而言之,安装docker宝塔面板在群晖上可能需要手动启动一些服务,并进行一些端口设置和配置,以确保正常访问和运行。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [群晖docker宝塔面板的填路-phpmyadmin无法访问](https://blog.csdn.net/weixin_39639600/article/details/113290179)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"] - *2* *3* [群晖安装docker+宝塔面板+80端口+自动同步](https://blog.csdn.net/xjc8289555/article/details/110734607)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值