Skip to content

Instantly share code, notes, and snippets.

@OndrejValenta
Last active August 11, 2020 20:50
Show Gist options
  • Save OndrejValenta/ebee4d0aa6d9205d3ab22580f08be74c to your computer and use it in GitHub Desktop.
Save OndrejValenta/ebee4d0aa6d9205d3ab22580f08be74c to your computer and use it in GitHub Desktop.

Install Docker on Hetzner's CentosOS

This script is based on Docker's installation steps and containerd installation fix based on this article Installation of Docker fails on CentOS 8 with Error — package containerd.io

Install prerequisities

yum install -y yum-utils
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum install -y https://download.docker.com/linux/centos/7/x86_64/stable/Packages/containerd.io-1.2.6-3.3.el7.x86_64.rpm

Install docker

yum install -y docker-ce docker-ce-cli
firewall-cmd --permanent --zone=trusted --change-interface=docker0

Install docker-compose

curl -L https://github.com/docker/compose/releases/download/1.26.2/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose

ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
chmod +rwx /usr/local/bin/docker-compose
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment