zoukankan      html  css  js  c++  java
  • Get Docker for CentOS and Installing Docker

    1、OS requirements

    To install Docker, you need the 64-bit version of CentOS 7.

    2、Uninstall old versions

    Older versions of Docker were called docker or docker-engine. If these are installed, uninstall them, along with associated dependencies.$ sudo yum remove docker

                      docker-common 
                      container-selinux 
                      docker-selinux 
                      docker-engine

    3、Install using the repository(Docker CE)

    (1) Install yum-utils, which provides the yum-config-manager utility:

      $ sudo yum install -y yum-utils

    (2) Use the following command to set up the stable repository. You always need the stablerepository, even if you want to install edge builds as well.

    $ sudo yum-config-manager 
        --add-repo 
        https://download.docker.com/linux/centos/docker-ce.repo

    (3) Optional: Enable the edge repository. This repository is included in the docker.repo file above but is disabled by default. You can enable it alongside the stable repository.

    $ sudo yum-config-manager --enable docker-ce-edge

    4、INSTALL DOCKER

    (1) Update the yum package index.

    $ sudo yum makecache fast

    (2) Install the latest version of Docker, or go to the next step to install a specific version.

    Docker EditionCommand
    Docker CE sudo yum install docker-ce
    Docker EE sudo yum install docker-ee

    (3) On production systems, you should install a specific version of Docker instead of always using the latest. List the available versions. This example uses the sort -r command to sort the results by version number, highest to lowest, and is truncated.

      yum list docker-ce.x86_64 --showduplicates |sort -r

    (4) Start Docker.

    sudo systemctl start docker

    (5) Verify that docker is installed correctly by running the hello-world image.

    $ sudo docker run hello-world




  • 相关阅读:
    Linux 文件查询
    Linux 文件与目录的权限
    Linux查看文件内容
    Linux文件与目录管理
    Linux的文件权限
    java 源码编译
    jvm 字节码执行 (二)动态类型支持与基于栈的字节码解释执行
    jvm 字节码执行 (一)方法调用
    玩转mongodb(七):索引,速度的引领(全文索引、地理空间索引)
    玩转mongodb(六):索引,速度的引领(普通索引篇)
  • 原文地址:https://www.cnblogs.com/taoge007/p/6824043.html
Copyright © 2011-2022 走看看