I have the following docker-compose file:
version: "2.4"
services:
auto_check:
image: python
mem_limit: 97M
That upon startup runs the following python script:
x = 'a' * (2 * 10 ** 8)
As expected, the docker fails with error code 137.
However, when I set mem_limit: 98M, the error does not reproduce.
Any idea why docker allows such an extreme memory limit violation?
The image size is 135MB (ubuntu20+python3).
(Running on WSL2-ubuntu:20.04)
Thanks for helping!