I see the same number and I have only 12 CPUs (cpu threads). When I get the number of CPU threads in the container, It shows 12.
Look for “siblings”
Containers by default can use all the CPUs the host have, since a container is not a virtual machine. In case of Docker Desktop, the Desktop has a virtual machine. Or in case of Windows, a WSL2 distribution which is also a container in WSL2 which is itself a virtual machine. I don’t know what Docker Desktop shows it looks like I can use more CPUs then 10 and the container CPU usage shows about 1192% meaning that it is more then the maximum 1000% (10x100%).
Only one image could “belong” to a container. When you write “docker” you actually mean Docker Desktop’s GUI. Docker is running in the virtual machine. The image list is the list of all images you have. There is no container there. The container tab could show containers and compose projects. One compose project can contain multiple images. So I still don’t understand what exactly you mean.
If you really want to test CPU usage, follow my tutorial:
It actually shows how you can build the test image.
Never run commands blindly. You could easily harm your system or lose data. Reading your messages it’s clear to me that you are not familiar with the basics so make sure you learn about it before you continue.
I copy the relevant part of the cpu test tutorial here too and modify the cpu test command so you can run it more easily:
# Based on "Petar Maric outdated image"
# Update the Ubuntu package index and install the required Ubuntu packages
RUN apt-get update \
&& apt-get install -y --no-install-recommends stress
# Parameterize this Dockerfile, by storing the app configuration within environment variables
ENV STRESS_TIMEOUT 120
ENV STRESS_MAX_CPU_CORES 1
CMD stress --cpu $STRESS_MAX_CPU_CORES --timeout $STRESS_TIMEOUT
Build the image
docker build -t localhost/stress .
Test 15 CPUs (or any number of cpus you choose)
docker run -it --rm \
-e STRESS_MAX_CPU_CORES=$CPUS \
-e STRESS_TIMEOUT=30 \
Then you have 30 seconds to see the result in Docker Desktop’s containers tab, but it won’t show you more then 10 cores allocated. Only the cpu usage will show about 1500%.