[Unit]
Description=Slice with MemoryLimit of 80% for docker
Before=slices.target
[Slice]
MemoryAccounting=true
MemoryMax=10%
{
"cgroup-parent": "docker.slice",
"exec-opts": ["native.cgroupdriver=systemd"]
}
sudo systemctl daemon-reload; sudo systemctl restart docker;