Skip to content

Instantly share code, notes, and snippets.

@jgreat
Last active January 13, 2020 16:45
Show Gist options
  • Save jgreat/9c09fb490695f112ec1c0a059f190429 to your computer and use it in GitHub Desktop.
Save jgreat/9c09fb490695f112ec1c0a059f190429 to your computer and use it in GitHub Desktop.
Docker CE on RHEL 7.6

Install Prerequisite Packages

yum install -y yum-utils \
  device-mapper-persistent-data \
  lvm2

Enable yum server-extras Repo

yum-config-manager --enable rhui-REGION-rhel-server-extras

Add docker-ce Repo

yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo

Install Docker

yum install docker-ce

Configure Docker

Make the /etc/docker directory

mkdir /etc/docker

Create /etc/docker/daemon.json

{
  "storage-driver": "overlay2",
  "storage-opts": [
    "overlay2.override_kernel_check=true"
  ],
  "exec-opts": [
    "native.cgroupdriver=systemd"
  ]
}

Kernel Parameters

create /etc/sysctl.d/docker.conf

net.bridge.bridge-nf-call-iptables = 1
net.bridge.bridge-nf-call-ip6tables = 1

Run sysctl to set parameters

sysctl -p /etc/sysctl.d/docker.conf

Start Docker

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