I was wondering whether there is a way to automatically limit the number of CPUs all docker container can use when running as by default, each container uses all the available resources.
When running the docker run
command, I know I can specify the number of CPUs (--cpus=
) but in my current case, the containers are started using another application (ShinyProxy) which does not allow me to specify this option.
I already spent a lot of time on this issue (e.g. using cgroups) but I haven't been able to set up anything working.
E.g, I tried to implement the solution proposed hereafter but I was not able to achieve any result. https://stackoverflow.com/a/46557336/8939750
Many thanks for your help,
Sylvain