Contents:
在 docker run 命令运行容器时,可以通过传递参数 --memory 和 --memory-swap 来限制容器能够使用的内存和交换空间。
docker run
--memory
--memory-swap
Runtime options with Memory, CPUs, and GPUs
Docker: Placing limits on container memory using cgroups