美文网首页
Centos安装Docker、DockerCompose

Centos安装Docker、DockerCompose

作者: 码农笔录 | 来源:发表于2021-10-08 13:12 被阅读0次

    1.更新系统

    yum update -y
    

    2.安装docker

    yum install -y yum-utils
    
    yum-config-manager \
        --add-repo \
        https://download.docker.com/linux/centos/docker-ce.repo
    
    yum install docker-ce docker-ce-cli containerd.io -y
    
    systemctl start docker
    

    3.安装docker-compose

    版本查看地址 https://github.com/docker/compose/releases

    wget -c -t 0 https://github.com/docker/compose/releases/download/1.29.2/docker-compose-`uname -s`-`uname -m` -O /usr/local/bin/docker-compose
    
    chmod a+rx /usr/local/bin/docker-compose
    
    docker-compose -v
    
    

    4.阿里云docker加速

    https://*****.mirror.aliyuncs.com 需要配置成你的加速地址,阿里云-> 控制台 ->容器镜像服务

    mkdir -p /etc/docker
    
    tee /etc/docker/daemon.json <<-'EOF'
    {
      "registry-mirrors": ["https://*****.mirror.aliyuncs.com"]
    }
    EOF
    
    systemctl daemon-reload
    
    systemctl restart docker
    

    相关文章

      网友评论

          本文标题:Centos安装Docker、DockerCompose

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