What is the default memory limit for a container

Like the subject says, what is the default memory limit of a docker container with no memory limit specified on docker run?

Kind regards, Martin


The default is “unlimited”, aka whatever the OS gives it.


Is there a way to limit the memory usage?

or mem_limit in docker-compose

This is no longer true, Mac’s seem to have a 2 GB limit. And Windows has some limit. These limits have broken our solutions and lead to hours of debugging.

1 Like

Probably because on Mac and Windows, docker is virtualized, no?