Skip to content

Instantly share code, notes, and snippets.

@cocampbe
Created August 29, 2019 11:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cocampbe/09ad19b46da0e345a02128a0e7b5d701 to your computer and use it in GitHub Desktop.
Save cocampbe/09ad19b46da0e345a02128a0e7b5d701 to your computer and use it in GitHub Desktop.
edited script for installing docker on RHEL based OS. Modified from kubernetes.io install snip.
# Install Docker CE
## Set up the repository
### Install required packages.
yum install -y yum-utils device-mapper-persistent-data lvm2
### Add Docker repository.
yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
## Install Docker CE.
yum install -y docker-ce-18.06.2.ce
## Create /etc/docker directory.
if [ ! -x /etc/docker ]; then
mkdir /etc/docker
fi
# Setup daemon.
cat > /etc/docker/daemon.json <<EOF
{
"exec-opts": ["native.cgroupdriver=systemd"],
"log-driver": "json-file",
"log-opts": {
"max-size": "100m"
},
"storage-driver": "overlay2",
"storage-opts": [
"overlay2.override_kernel_check=true"
]
}
EOF
mkdir -p /etc/systemd/system/docker.service.d
# Restart Docker
systemctl daemon-reload
systemctl enable --now docker
@cocampbe
Copy link
Author

used this to run minikube on a VM running centos7u6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment