yum install -y yum-utils \
device-mapper-persistent-data \
lvm2
yum-config-manager --enable rhui-REGION-rhel-server-extras
yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
yum install docker-ce
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"
]
}
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
systemctl enable docker
systemctl start docker