Last active
November 11, 2024 11:51
-
-
Save ShockwaveNN/2e37d61fa04e19ba814667b05502bc1c to your computer and use it in GitHub Desktop.
Offline install for docker on Centos 7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
wget --content-disposition https://nct.onlyoffice.com/sh/Xsy # Hello world image | |
wget http://mirror.centos.org/centos/7/extras/x86_64/Packages/container-selinux-2.107-1.el7_6.noarch.rpm | |
wget https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-19.03.5-3.el7.x86_64.rpm | |
wget https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-cli-19.03.5-3.el7.x86_64.rpm | |
wget https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-selinux-17.03.3.ce-1.el7.noarch.rpm | |
wget https://download.docker.com/linux/centos/7/x86_64/stable/Packages/containerd.io-1.2.6-3.3.el7.x86_64.rpm | |
sudo systemctl restart network # Just for test purposes | |
sudo rpm -i container-selinux-2.107-1.el7_6.noarch.rpm | |
sudo rpm -i docker-ce-19.03.5-3.el7.x86_64.rpm docker-ce-cli-19.03.5-3.el7.x86_64.rpm docker-ce-selinux-17.03.3.ce-1.el7.noarch.rpm containerd.io-1.2.6-3.3.el7.x86_64.rpm | |
sudo systemctl start docker | |
sudo docker load -i hello-world.docker | |
sudo docker run hello-world |
@oyearunpal Centos 7 is no longer supported on OS level, so no point in this script at all all this years later - so if you're using it and Centos 7 - please stop :)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Update the 3 line with
wget https://linuxsoft.cern.ch/cern/centos/7/extras/x86_64/Packages/container-selinux-2.107-1.el7_6.noarch.rpm as the above link is broken