Skip to content

Instantly share code, notes, and snippets.

@ShockwaveNN
Last active November 11, 2024 11:51
Show Gist options
  • Save ShockwaveNN/2e37d61fa04e19ba814667b05502bc1c to your computer and use it in GitHub Desktop.
Save ShockwaveNN/2e37d61fa04e19ba814667b05502bc1c to your computer and use it in GitHub Desktop.
Offline install for docker on Centos 7
#!/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
@ShockwaveNN
Copy link
Author

@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