Cannot increase size for docker container – Ubuntu 16.04
I tried running
docker run --memory=16g -ti -v [...]
But on my other terminal when I run
docker stats, it always show that
MEM USAGE / LIMIT 48.89 MiB / 3.724 GiB
And it seems like
3.724Gb is the upper bound of the limit – if I rerun with only
--memory=1G then it will accept.
Can I increase/change this?
One Solution collect form web for “Cannot increase size for docker container – Ubuntu 16.04”
Docker can’t allocate more memory to a container than the docker host has available. If you check
docker info, you should see the 3.724 limit. If you are on Windows or MacOS, then docker is running inside of a VM under the covers, and that VM has a limit on how much of your memory is allocated to it. You can adjust this limit by changing the settings on the VM (in some versions, this is available in the docker preferences).