zoukankan      html  css  js  c++  java
  • Get Docker Engine

    1. Uninstall old versions

      yum remove docker 
                        docker-client 
                        docker-client-latest 
                        docker-common 
                        docker-latest 
                        docker-latest-logrotate 
                        docker-logrotate 
                        docker-engine
      View Code
    2. Install using the repository

      Install required packages.
      install -y yum-utils 
        device-mapper-persistent-data 
        lvm2
      View Code
      Use the following command to set up the stable repository.
      yum-config-manager 
          --add-repo 
          https://download.docker.com/linux/centos/docker-ce.repo
      View Code
    3. INSTALL DOCKER ENGINE - COMMUNITY

      Install the latest version of Docker Engine - Community and containerd.
      yum install docker-ce docker-ce-cli containerd.io
      View Code
      To install a specific version of Docker Engine - Community, list the available versions in the repo, then select and install:
      yum list docker-ce --showduplicates | sort -r
      
      yum install docker-ce-<VERSION_STRING> docker-ce-cli-<VERSION_STRING> containerd.io
      View Code
      Start Docker.
      systemctl start docker
      View Code
      Verify that Docker Engine - Community is installed correctly by running the hello-world image.
      docker run hello-world
      View Code

        

    4. Install from a package

      Go to https://download.docker.com/ and download the .rpm file for the Docker version you want to install.
       #!
      View Code
      Install Docker Engine - Community
      yum install /path/to/package.rpm
      View Code
      Start Docker.
      Verify that Docker Engine - Community is installed correctly by running the hello-world image.
      systemctl start docker
      
      docker run hello-world
      View Code
    5. Install using the convenience script

      This example uses the script at get.docker.com to install the latest release of Docker Engine - Community on Linux. To install the latest testing version, use test.docker.com instead. In each of the commands below, replace each occurrence of get with test.
      curl -fsSL https://get.docker.com -o get-docker.sh
      
      sh get-docker.sh
      
      #非 root 操作
      usermod -aG docker your-user
      View Code
    6. Uninstall Docker Engine - Community

      # Uninstall the Docker package:
      yum remove docker-ce
      
      # Images, containers, volumes, or customized configuration files on 
      #your host are not automatically removed. To delete all images, 
      #containers, and volumes:
      rm -rf /var/lib/docker
      View Code

       

    7. Install Docker Engine - Community from binaries

      1. Download the static binary archive. Go to https://download.docker.com/linux/static/stable/ (or change stable to nightly or test), choose your hardware platform, and download the .tgz file relating to the version of Docker Engine - Community you want to install.  
      2. Extract the archive using the tar utility. The dockerd and docker binaries are extracted.
      3. Optional: Move the binaries to a directory on your executable path, such as /usr/bin/. If you skip this step, you must provide the path to the executable when you invoke docker or dockerd commands.
      4. Start the Docker daemon:
        ./dockerd &
        View Code
      5. Daemon configuration file (default "/etc/docker/daemon.json")
        Location of client config files (default "/root/.docker")
    dockerd &
    一切代码都是为了生活,一切生活都是调剂
  • 相关阅读:
    Python中获取异常(Exception)信息
    Python 3.5 连接Mysql数据库(pymysql 方式)
    用命令查看Mysql中数据库、表的空间大小
    MySQLdb操作mysql的blob值
    mysql.connector操作mysql的blob值
    windows获取硬盘使用率等信息
    python操作系统环境变量
    git clone
    在Spring项目中使用Log4j记录日志
    org.apache.log4j.Logger详解
  • 原文地址:https://www.cnblogs.com/argor/p/7908104.html
Copyright © 2011-2022 走看看