Docker Community Forums

Share and learn in the Docker community.

Is Docker limited to 64 running containers (per image)?

I’ve run into a problem with Docker and can’t find any helpful answers searching the web.

I found to which the answer boils down to “the limit is set by the system resources”.

Either this doesn’t apply or - more likely - I don’t know the limit I’m running up against.

I have a Docker image based on microsoft/dotnet:2.1-aspnetcore-runtime, created as Linux container and supposed to be running on Docker for Windows on a Win 10 Pro machine (during development).
The Docker Desktop version is (31259).

I can start multiple containers of this image and they all work as supposed. However I’m not able to start more than the afore mentioned 64 containers using

docker run -d -v C:\Users\Public\Documents\DockerShare:/app/SharedData dockerImage:latest

I started out with a 10GB limit for Docker and already increased it to 16GB, but to no avail. Also the 64 machines runnig a kestrel server only account for a 1.8GB (when idle, as they are right after being started) of memory used.

Another touching point is a share that each of the containers mounts when started.

I also checked but there doesn’t seem to be a property to limit the number of containers in there.


I have tried the same on an Ubuntu 18.04.2 LTS with the same result.
Once I reach the start of container #65 the container immediately exits with code 139.
The volume is of course changed to a linux path like

docker run -d -v ~/DockerShare:/app/SharedData dockerImage:latest

The Docker version here is 18.09.6, build 481bc77

It seems that I found the solution.

After upgrading all our services to ASPNET Core 2.2 I went through the code to check for any hard links to previous donet core versions and found the following lines in the Startup.cs file

public void ConfigureServices(IServiceCollection services)
    //                                                                    ====
    //                                                                      ^
    //                                                                      |   

After replacing _2_1 with _2_2 and rebuilding the container I was able to start 100 containers without any issue.