Monday, October 3
Shadow

docker and compose install on centos7

sudo yum install yum-utils

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

for channel in "stable" "test" "nightly"; do \
    relver=7Server; \
    sudo yum-config-manager --setopt="docker-ce-${channel}.baseurl=https://download.docker.com/linux/centos/$relver/\$basearch/${channel}" --save; \
    sudo yum-config-manager --setopt="docker-ce-${channel}-debuginfo.baseurl=https://download.docker.com/linux/centos/$relver/debug-\$basearch/${channel}" --save; \
    sudo yum-config-manager --setopt="docker-ce-${channel}-source.baseurl=https://download.docker.com/linux/centos/$relver/source/${channel}" --save; \
done

sudo yum install docker-ce docker-ce-cli containerd.io docker-compose-plugin -y

sudo systemctl start docker

Leave a Reply