zoukankan      html  css  js  c++  java
  • centos docker

    1. Install required packages. yum-utils provides the yum-config-manager utility, and device-mapper-persistent-data and lvm2 are required by the devicemapper storage driver.

      $ sudo yum install -y yum-utils 
        device-mapper-persistent-data 
        lvm2
      
    2. Use the following command to set up the stable repository.

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

    Optional: Enable the nightly or test repositories.

    These repositories are included in the docker.repo file above but are disabled by default. You can enable them alongside the stable repository. The following command enables the nightly repository.

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

    To enable the test channel, run the following command:

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

    You can disable the nightly or test repository by running the yum-config-manager command with the --disable flag. To re-enable it, use the --enable flag. The following command disables the nightly repository.

    $ sudo yum-config-manager --disable docker-ce-nightly
    

    Learn about nightly and test channels.

    INSTALL DOCKER CE

    1. Install the latest version of Docker CE and containerd, or go to the next step to install a specific version:

      $ sudo yum install docker-ce docker-ce-cli containerd.io



      Let's get started by modifying systemd's docker start up script. Open file /lib/systemd/system/docker.service with your favorite text editor and replace the following line where /new/path/docker is a location of your new chosen docker directory:
      FROM:
      ExecStart=/usr/bin/docker daemon -H fd://
      TO:
      ExecStart=/usr/bin/docker daemon -g /new/path/docker -H fd://
      
      When ready stop docker service:
      # systemctl stop docker
      

      SUBSCRIBE TO NEWSLETTER
      Subscribe to Linux Career NEWSLETTER and receive latest Linux news, jobs, career advice and tutorials.


      
      It is important here that you have completely stopped docker daemon. The following linux commandwill yield no output only if docker service is stopped:
      # ps aux | grep -i docker | grep -v grep
      
      If no output has been produced by the above command, reload systemd daemon:
      # systemctl daemon-reload
      
      Once this is done create a new directory you specified above and optionally rsync current docker data to a new directory:
      # mkdir /new/path/docker
      # rsync -aqxP /var/lib/docker/ /new/path/docker
       
  • 相关阅读:
    cocos2d-x JS 定时器暂停方法
    cocos2d-x JS 本地玩家位置跟服务器玩家位置转换相关
    cocos creator 背景音乐音量和音效音量百分比设置
    iPhoneX快速适配,简单到你想哭。
    Cocos Creator Slider(进度条)的三种实现
    图片的本地存储和读取问题
    Creator仿超级玛丽小游戏源码分享
    cocos2d-x 贡献一个oss上传脚本
    Cocos Creator
    Cocos Creator cc.Node.点击事件
  • 原文地址:https://www.cnblogs.com/studyNT/p/10846929.html
Copyright © 2011-2022 走看看