offline-kubernetes-install/docker/install.sh
2023-09-12 17:28:07 +08:00

22 lines
336 B
Bash

#!/bin/bash
set -euo pipefail
yum install -y docker-ce-20.10/*.rpm
sudo mkdir /etc/docker
cat <<EOF | sudo tee /etc/docker/daemon.json
{
"exec-opts": ["native.cgroupdriver=systemd"],
"log-driver": "json-file",
"log-opts": {
"max-size": "100m"
},
"storage-driver": "overlay2"
}
EOF
sudo systemctl enable docker --now