zoukankan      html  css  js  c++  java
  • Centos7下安装docker

    首先卸载所有和docker相关的软件

    $ 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
    设置docker安装仓库
    $ sudo yum install -y yum-utils 
      device-mapper-persistent-data 
      lvm2

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

    安装Docker CE

    sudo yum install docker-ce

    查看其他可安装版本:
    # yum list docker-ce --showduplicates | sort -r
    docker-ce.x86_64            18.03.0.ce-1.el7.centos             docker-ce-stable

    启动Docker
    # systemctl start docker

    执行一个例子:
    # docker run hello-world

    输出如下表明docker安装成功了

    Hello from Docker!

    This message shows that your installation appears to be working correctly.

     

    To generate this message, Docker took the following steps:

     1. The Docker client contacted the Docker daemon.

     2. The Docker daemon pulled the "hello-world" image from the Docker Hub.

        (amd64)

     3. The Docker daemon created a new container from that image which runs the

        executable that produces the output you are currently reading.

     4. The Docker daemon streamed that output to the Docker client, which sent it

        to your terminal.

     

    To try something more ambitious, you can run an Ubuntu container with:

     $ docker run -it ubuntu bash

     

    Share images, automate workflows, and more with a free Docker ID:

     https://hub.docker.com/

     

    For more examples and ideas, visit:

     https://docs.docker.com/engine/userguide/





     
  • 相关阅读:
    (原)Lazarus 异构平台下多层架构思路、DataSet转换核心代码
    (学)新版动态表单研发,阶段成果3
    (学) 如何将 Oracle 序列 重置 清零 How to reset an Oracle sequence
    (学)XtraReport WebService Print 报错
    (原)三星 i6410 刷机 短信 无法 保存 解决 办法
    (原) Devexpress 汉化包 制作工具、测试程序
    linux下网络配置
    apache自带ab.exe小工具使用小结
    Yii::app()用法小结
    PDO使用小结
  • 原文地址:https://www.cnblogs.com/myzhijie/p/9544409.html
Copyright © 2011-2022 走看看