3 ms·
Is it true that Docker is single-threaded (or only allows a single thread)? I had a guy who ran some of my software once that said it wouldn't work in Docker.
by simonblack 3y ago
Is it true that Docker is single-threaded (or only allows a single thread)?
I had a guy who ran some of my software once that said it wouldn't work in Docker. My software used several threads. I'm sure that I read somewhere that one of the problems with Docker was that it only allowed single-threaded programs to work.
- kuhsaft 3y agoThat is false. Creation of threads/processes is still available within a container. Docker will run the entry point as PID 0 and that process can create as many subprocesses as it wants. If you’re talking about cores, Docker utilizes Linux cgroups which permits usage of multiple cores. You can limit the CPU quota and assign the container to specific cores. See https://docs.docker.com/config/containers/resource_constraints/#cpu https://docs.docker.com/config/containers/resource_constrain...