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/





     
  • 相关阅读:
    svn中trunk、branches、tags
    支付宝支付对接过程
    分享插件
    ES6学习笔记
    VS code
    Angular45
    React笔记
    查询Table name, Column name, 拼接执行sql文本, 游标, 存储过程, 临时表
    通过脚本把远程服务器上的表和数据拷贝到本地数据库
    mongo客户端mongo VUE增删改查
  • 原文地址:https://www.cnblogs.com/myzhijie/p/9544409.html
Copyright © 2011-2022 走看看