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

2 Likes

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

2 Likes

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.

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