You try to start your docker container with limits for memory and you get this warning:
Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap.
At this point, I assume you have already cgroup working, CPU and RAM is limited and only swap is left.
These steps were done on Debian Buster.
1. Edit /etc/default/grub and update the entry GRUB_CMDLINE_LINUX as follows
root@candy:~# grep GRUB_CMDLINE_LINUX /etc/default/grub GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1"
2. Update grub
root@candy:~# update-grub Generating grub configuration file ... Found linux image: /boot/vmlinuz-4.19.0-9-amd64 Found initrd image: /boot/initrd.img-4.19.0-9-amd64 done