美文网首页
docker && docker-compose安装

docker && docker-compose安装

作者: Rami | 来源:发表于2022-06-21 18:54 被阅读0次

    1.安装docker

    wget -O /etc/yum.repos.d/docker-ce.repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
    
    yum -y install docker-ce
    systemctl enable docker
    systemctl start docker
    

    2.安装docker-compose

    2.1 方式一

    wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
    yum install  docker-compose   -y       (需要epel源)
    

    2.2 方式二:根据自己所需版本安装

    image.png image.png image.png
    #1.下载
    wget https://github.com/docker/compose/releases/download/v2.6.0/docker-compose-linux-x86_64
    
    #2.安装及测试
    # ls
    docker-compose-linux-x86_64
    # chmod  +x docker-compose-linux-x86_64 
    # mv docker-compose-linux-x86_64 /usr/bin/docker-compose
    # docker-compose  version
    Docker Compose version v2.6.0
    

    相关文章

      网友评论

          本文标题:docker && docker-compose安装

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