0

I run a docker build on my unix build machine and therefore I need more than 2GB Memory (default value of docker engine). I got the build working on my Mac with the docker Desktop UI in the settings as you can see it in the image. enter image description here

How is this possible in Unix?

Michi-2142
  • 1,170
  • 3
  • 18
  • 39
  • 1
    Should probably read [this from the docker documentation](https://docs.docker.com/config/containers/resource_constraints/) (found by searching for "docker memory configuration"). See also https://stackoverflow.com/q/62649255 – Hasturkun Nov 10 '21 at 08:16

1 Answers1

0

If you want to increase the allocated memory and CPU while running a container you can try this:

docker run -it --cpus="2" --memory="4096m" ubuntu /bin/bash

You can also do the same while deploying services using docker-compose

More infos:

https://docs.docker.com/config/containers/resource_constraints/

How to specify Memory & CPU limit in docker compose version 3

Aniruddha Bera
  • 399
  • 6
  • 19