1

I'm using Docker with Ubuntu in a development environment, but I noticed that docker can use all the resources of the host machine, is there any way I can limit this without having to configure each of the containers?

I tried to configure the docker daemon.json example:

{ 
  "cpus": 1,
  "memory": "4096m"
}

1 Answers1

0

You should have a look to this similar question at Unix&Linux: https://unix.stackexchange.com/questions/537645/how-to-limit-docker-total-resources.

The suggested answer implies the use of systemd slices in Ubuntu to manage resources of a group of processes, in this case Docker. More about slices can be found in Ubuntu's documentation: https://manpages.ubuntu.com/manpages/bionic/man5/systemd.slice.5.html.

Miguel A. C.
  • 1,366
  • 11
  • 12