美文网首页
CentOS 安装docker

CentOS 安装docker

作者: 林亚希 | 来源:发表于2020-08-19 14:51 被阅读0次
    1. 官方安装文档
      https://docs.docker.com/engine/install/centos/
    2. 如果下载忙更换阿里的源
    yum install -y yum-utils
    yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
    yum install docker-ce
    sudo systemctl start docker
    
    1. docker源地址切换到阿里云
    vi /etc/docker/daemon.json
    {
      "registry-mirrors": ["https://ae2nhzyb.mirror.aliyuncs.com"]
    }
    ##然后重启Docker服务
    sudo systemctl daemon-reload
    sudo systemctl restart docker
    
    1. 安装docker-compose
    curl -L https://get.daocloud.io/docker/compose/releases/download/1.25.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
    sudo chmod +x /usr/local/bin/docker-compose
    docker-compose -version
    
    

    相关文章

      网友评论

          本文标题:CentOS 安装docker

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