Limit Container Memory
If you need to enforce strict memory limits within your container, you should reference Limit a Container's Access to Memory. While troubleshooting, you may also find useful information within How to See Memory and CPU Usage for All Your Docker Containers, specifically its description of how to use docker stats
.