Luba A
Luba A

Reputation: 81

How docker allocate memory to the process in container?

Docker first initializes a container and then execute the program you want. I wonder how docker manages the memory address of container and the program in it.

Upvotes: 1

Views: 1817

Answers (2)

meliora245
meliora245

Reputation: 53

Rather than worrying about the docker memory, you would need to look at the underlying host (VM/instance) where you are running the docker container. The number of containers is determined by a number of factors including what your app is that runs on the container. See here for the limits that you can run into Is there a maximum number of containers running on a Docker host?

Upvotes: 0

farzad
farzad

Reputation: 8855

Docker does not allocate memory, it's the OS that manages the resources used by programs. Docker (internally) uses cgroups which is a kernel service. The reason that ps command (on the host) won't show up processes running in a container, is that containers run in different cgroups which are isolated from each other.

Upvotes: 3

Related Questions