zoukankan      html  css  js  c++  java
  • CentOS Docker 安装

    Docker支持以下的CentOS版本:

    • CentOS 7 (64-bit)
    • CentOS 6.5 (64-bit) 或更高的版本

    前提条件

    目前,CentOS 仅发行版本中的内核支持 Docker。

    Docker 运行在 CentOS 7 上,要求系统为64位、系统内核版本为 3.10 以上。

    Docker 运行在 CentOS-6.5 或更高的版本的 CentOS 上,要求系统为64位、系统内核版本为 2.6.32-431 或者更高版本。

    使用 yum 安装(CentOS 7下)

    Docker 要求 CentOS 系统的内核版本高于 3.10 ,查看本页面的前提条件来验证你的CentOS 版本是否支持 Docker 。

    通过 uname -r 命令查看你当前的内核版本

    uname -r 3.10.0-327.el7.x86_64

    安装 Docker

    从 2017 年 3 月开始 docker 在原来的基础上分为两个分支版本: Docker CE 和 Docker EE。

    Docker CE 即社区免费版,Docker EE 即企业版,强调安全,但需付费使用。

    本文介绍 Docker CE 的安装使用。

    移除旧的版本:

    $ sudo yum remove docker 
                      docker-client 
                      docker-client-latest 
                      docker-common 
                      docker-latest 
                      docker-latest-logrotate 
                      docker-logrotate 
                      docker-selinux 
                      docker-engine-selinux 
                      docker-engine

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

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

    添加软件源信息:(也可以wget下载文件,复制到/etc/yum.repos.d/)

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

    更新 yum 缓存:

    yum makecache fast

    安装 Docker-ce:

    yum -y install docker-ce

    启动 Docker 后台服务(也可以安装ntsysv工具管理开机服务)

    systemctl start docker

    下来配置加速源:

    [root@localhost ~]# mkdir /etc/docker/
    [root@localhost ~]# touch /etc/docker/deamon.json
    [root@localhost ~]# vim /etc/docker/deamon.json
    
    {
      "registry-mirrors": ["https://tqx543h6.mirror.aliyuncs.com"]
    }
    
    [root@localhost ~]# systemctl restart docker

    测试运行 hello-world

    docker run hello-world

    转: http://www.runoob.com/docker/centos-docker-install.html

  • 相关阅读:
    CSDN博客 专用备份工具
    discuz 7.0 uc 同步登录方法
    delphi 子窗体最大化
    OO系统分析员之路用例分析系列(8)如何编写一份完整的UML需求规格说明书[整理重发]
    delphi 抓取网页内容的程序
    delphi messagebox 使用技巧
    windows mobile下实现程序安装和卸载
    纯真IP库算法
    delphi idhttp 使用方法
    最近评论回复汇总
  • 原文地址:https://www.cnblogs.com/fps2tao/p/10323370.html
Copyright © 2011-2022 走看看