argor

   :: 首页  :: 新随笔  :: 联系 ::  :: 管理

 

  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 &
posted on 2017-11-28 09:57  argor  阅读(470)  评论(0编辑  收藏  举报