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. Linux for Matlab中文注释乱码(亲测有效)

    中文注释乱码的原因是windows下的m文件采用的是gb2312编码,只要将所有的m文件转成 utf8文件,显示就正常了. 1.首先安装enca:sudo apt-get install enca 2 ...

  2. 部署ComsenzDiscuz BBS论坛系统

    1.准备环节 [root@localhost ~]# unzip ComsenzDiscuz-DiscuzX-master.zip //解包 [root@localhost ~]# cd Discuz ...

  3. [LeetCode] 921. Minimum Add to Make Parentheses Valid 使括号有效的最少添加

    Given a string S of '(' and ')' parentheses, we add the minimum number of parentheses ( '(' or ')', ...

  4. Nginx 的 Timeout Wait 解决

    1.问题解决办法 查看Nginx并发状态 #netstat -n | awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}' TIME_WAIT ...

  5. torch_09_DCGAN_注意的细节

    DCGAN github链接:https://github.com/darr/DCGAN DCGAN:1.在一次epoch中,如果第i批的i能够整除every_print,则打印到output文件中( ...

  6. pytorch_01_基础_一维线性回归

    pytorch基础 pytorch官方文档:https://pytorch.org/docs/master/nn.html#linear-layers import torchfrom torch i ...

  7. HTTP之如何控制缓存

    HTTP控制缓存的能力 ===================摘自<HTTP权威指南>==================================== 服务器可以通过HTTP定义的 ...

  8. 34,Leetcode 组合总和I,II -C++ 回溯法

    I 题目描述 给定一个无重复元素的数组 candidates 和一个目标数 target ,找出 candidates 中所有可以使数字和为 target 的组合.candidates 中的数字可以无 ...

  9. git 版本库之间的依赖 --submodule

    自己做实验: 在github上建一个版本库B作为submoule: https://github.com/FrankKuiFang/testGit_submodule, 尝试将该版本库作为另一个库A ...

  10. CopyOnWriteArraySet 源码分析

    CopyOnWriteArraySet  源码分析: 1:数据结构: private final CopyOnWriteArrayList<E> al; 内部维护的是一个CopyOnWri ...