Docker在Centos 7上的部署

方法1---开启centos 7上自带的 extras YUM源,然后 yum install docker来安装

安装前必须保证 Linux Kernel 要 3.10+, 用 uname -r 查这个参数

[root@Franklin13 yum.repos.d]# cat CentOS-Base.repo |grep -a2 extras

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
enabled=1
gpgcheck=1

但 extras源里的 docker的版本很低,故采用如下方法:

方法2 --- 通过下载清华大学上的开源 docker-ce YUM源来安装

https://download.docker.com ---> 替换成  https://mirrors.tuna.tsinghua.edu.cn/docker-ce

然后出现如下报错, 经查是清华大学的 URL地址写错了,docker-ce后少打了 /。之后修复成功

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.
https://mirrors.tuna.tsinghua.edu.cn/docker-celinux/centos/7/x86_64/stable/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
[root@Franklin13 ~]#

---整理相关报错详情

--> Finished Dependency Resolution
Error: Package: 2:container-selinux-2.107-3.el7.noarch (extras)
Requires: selinux-policy >= 3.13.1-216.el7
Installed: selinux-policy-3.13.1-166.el7.noarch (@anaconda)
selinux-policy = 3.13.1-166.el7
Error: Package: 2:container-selinux-2.107-3.el7.noarch (extras)
Requires: selinux-policy-targeted >= 3.13.1-216.el7
Installed: selinux-policy-targeted-3.13.1-166.el7.noarch (@anaconda)
selinux-policy-targeted = 3.13.1-166.el7
Error: Package: 2:container-selinux-2.107-3.el7.noarch (extras)
Requires: selinux-policy-base >= 3.13.1-216.el7
Installed: selinux-policy-targeted-3.13.1-166.el7.noarch (@anaconda)
selinux-policy-base = 3.13.1-166.el7
Available: selinux-policy-minimum-3.13.1-166.el7.noarch (c7-media)
selinux-policy-base = 3.13.1-166.el7
Available: selinux-policy-mls-3.13.1-166.el7.noarch (c7-media)
selinux-policy-base = 3.13.1-166.el7
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
[root@Franklin13 ~]#
[root@Franklin13 ~]# yum update selinux-policy
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* extras: ftp.sjtu.edu.cn
No packages marked for update
[root@Franklin13 ~]#

----------------------故不得不求救于马云的阿里云镜像, 看如下 --------------------------

https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

[root@Franklin13 yum.repos.d]# yum install docker-ce (发现只有阿里云的 docker-ce源可以自动解决软件的依赖包问题 )

Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile

[root@Franklin13 yum.repos.d]# systemctl start docker.service
[root@Franklin13 yum.repos.d]# docker version

[root@Franklin13 yum.repos.d]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
[root@Franklin13 yum.repos.d]#
[root@Franklin13 yum.repos.d]# docker info
Client:
Debug Mode: false

Server:
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 0
Server Version: 19.03.4
Storage Driver: overlay2

Docker在Centos 7上的部署的更多相关文章

  1. Docker 在 centos 7上升级

    Docker 在 centos 7上升级 狂暴的蚂蚁 关注 2017.05.22 10:49* 字数 194 阅读 3253评论 0喜欢 1 引子 如果有旧的Docker 先删除 旧Docker版本上 ...

  2. jumpserver在centos 7上的部署

    cd /opt/git clone https://github.com/jumpserver/jumpserver.gitcd jumpservergit checkout master 准备安装: ...

  3. [原创]JavaEE在CentOS服务器上的部署

    1.安装rz.sz命令 yum install lrzsz 2.配置环境变量 vi .bash_profile 默认的path:PATH=$PATH:$HOME/.local/bin:$HOME/bi ...

  4. CentOS 7上搭建Docker环境

    一.Docker介绍和安装 http://linux.cn/article-4340-1.html Docker 是一个开源工具,它可以让创建和管理 Linux 容器变得简单.容器就像是轻量级的虚拟机 ...

  5. 在CentOS 6上搭建私有的Docker Registry

    在CentOS 6上搭建私有的Docker Registry v2Registry概念 :Registry是一个无状态的, 高可扩展的服务器端应用程序, 用于存储和分发Docker Image. 依赖 ...

  6. 如何在CentOS 7上部署Google BBR【搬运、机翻】

    如何在CentOS 7上部署Google BBR 本文章搬运自 https://www.vultr.com/docs/how-to-deploy-google-bbr-on-centos-7 [注:文 ...

  7. 在CentOS 7上部署Ghost博客

    作者:waringid 一.简介 跟静态博客不同的是,Ghost 这种轻量级的动态博客,有一个管理后台,可以直接写作和管理博客.本质上,跟 WordPress 是相通的,只是 Ghost 搭建在 No ...

  8. 【转载】在Centos系统上采用二进制文件部署Node.js环境

    Node.js 是一个基于 Chrome V8 引擎的 JavaScript 运行环境,用来方便地搭建快速的易于扩展的网络应用.Node.js 使用了一个事件驱动.非阻塞式 I/O 的模型,使其轻量又 ...

  9. 在 CentOS 7上Virtualbox+phpVirtualBox完整虚拟化环境部署

    一.phpVirtualBox简介      VirtualBox是一套为不同操作系统而设的 x86 虚拟化产品.它是一个机器/硬件的虚拟化产品,功能上与 VMware Server.Parallel ...

随机推荐

  1. 使用hangfire在xunit中

    框架为:abp hangfire配置连接:https://aspnetboilerplate.com/Pages/Documents/Hangfire-Integration 在单元测试中如何配置呢? ...

  2. java实体 和 xml相互转换

    参考: https://blog.csdn.net/LookForDream_/article/details/88884316 https://zhuchengzzcc.iteye.com/blog ...

  3. printkd

    #include <linux/fs.h> #include <asm/uaccess.h> #include <linux/namei.h> #include & ...

  4. 【搜索】L国的战斗之伞兵

    伞兵?SB?嘿嘿嘿 原题传送门 思路 这道题需要采用倒退的思想. 如果a[x][y]无风或可吹至无风区: 那么它南面如果是北风区,则北风区就也是无风或可吹至无风区(实际上就是可吹至无风区). 那么它北 ...

  5. 基于Redis实现分布式定时任务调度

    项目开发过程中,难免会有许多定时任务的需求进来.如果项目中还没有引入quarzt框架的情况下,我们通常会使用Spring的@Schedule(cron="* * * * *")注解 ...

  6. Java Scala获取所有注解的类信息

    要想获取使用指定注解的类信息,可借助工具: org.reflections.Reflections 此工具将Java反射进行了高级封装,Reflections 通过扫描 classpath,索引元数据 ...

  7. CentOS7 Zookeeper 安装

    集群部署 192.168.38.6  zk01192.168.38.7  zk02192.168.38.8  zk03 安装zookeeper,必须安装jdk. 1.下载 $ cd /usr/loca ...

  8. nginx 目录自动加斜线”/”

    默认配置当你访问http://abc.example.com/dir 时不会加”/” 常见做法 if (-d $request_filename){  rewrite ^/(.*)([^/])$ ht ...

  9. Python处理数据集-1

    原数据集的数据格式: 每行为:(test_User, test_Item) negativeItem1 negativeItem2 negativeItem3 …… negativeItem99 即每 ...

  10. 第五节:EF Core中的三类事务(SaveChanges、DbContextTransaction、TransactionScope)

    一. 说明 EF版本的事务介绍详见: 第七节: EF的三种事务的应用场景和各自注意的问题(SaveChanges.DBContextTransaction.TransactionScope). 本节主 ...