Skip to content

Instantly share code, notes, and snippets.

@brunneis
Created December 8, 2019 21:44
Show Gist options
  • Save brunneis/d146b27471617639fd602ef2f87ebd3a to your computer and use it in GitHub Desktop.
Save brunneis/d146b27471617639fd602ef2f87ebd3a to your computer and use it in GitHub Desktop.
Docker CentOS 8
#!/bin/bash
# Misc
yum -y update
yum -y install epel-release
yum -y install htop nano git
# Docker
yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum install -y docker-ce
mkdir -p /etc/docker
touch /etc/docker/daemon.json
echo '{"storage-driver":"overlay2","storage-opts":["overlay2.override_kernel_check=true"]}' > /etc/docker/daemon.json
systemctl enable docker
systemctl start docker
DOCKER_COMPOSE_VERSION=1.21.2 # With latest releases, the container names include the unique ID
curl -L https://github.com/docker/compose/releases/download/$DOCKER_COMPOSE_VERSION/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
PATH=$PATH:/usr/local/bin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment