美文网首页
centos 7 docker

centos 7 docker

作者: lizilong007 | 来源:发表于2019-07-17 22:16 被阅读0次

    sudo yum install -y yum-utils device-mapper-persistent-data lvm2

    # 国内用阿里的源

    sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

    sudo yum install docker-ce -y

    sudo usermod -aG docker $(whoami)

    # 启动

    sudo systemctl enable docker.service

    sudo systemctl start docker.service

    # 安装docker-compose

    sudo yum install epel-release -y

    sudo yum install -y python-pip

    sudo pip install docker-compose

    docker-compose version

    # 添加国内源
    sudo touch /etc/docker/daemon.json
    sudo vi /etc/docker/daemon.json

    {
      "registry-mirrors": ["https://registry.docker-cn.com"]
    }
    

    相关文章

      网友评论

          本文标题:centos 7 docker

          本文链接:https://www.haomeiwen.com/subject/kglhlctx.html