Docker Community Forums

Share and learn in the Docker community.

More cpus for container

I created a windows container that I want to use to run some powershell script that setup a test environment. I got my scripts to run, but some of my scripts run in parallel. When this happens performance goes out the windows. The windows vm that is hosting this container has 16 core, the continer only has 2. How can I start the container to have more cores? I don’t see an option in the docker desktop?
The way I am checking for the number of cores is by running the command: wmic cpu get SocketDesignation,NumberOfCores, NumberOfLogicalProcessors /Format:List

Thanks

That’s because it is not a global configuration. There is a “windows only” parameter to set the number of CPU-s: --cpu-count

docker run --cpu-count 4 imagename