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

  • Docker daemon not starting after adding the -H flag
  • Need for service discovery for docker engine swarm mode
  • Case sensitive host volume mount in docker for windows
  • How can OpenAI Gym's visualizations work within Docker?
  • Use a docker image for a whole server
  • centos docker:Error while pulling image
  • 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?

  • sonar-scanner- throws java.lang.ExceptionInInitializerError inside docker container
  • How to connect my docker image to my kubernetes cluster?
  • How to use the docker connection-plugin of ansible?
  • What is the best way to manage cert/key for Docker containers that must talk TLS
  • Understanding Docker best practice and running webservers
  • Can I restart a docker container from within the container terminal?
  • 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).

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.