Skip to content

Comment on Unpacking Linux containers: understanding Docker and its alternatives

Comments

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.

That 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_constrain...

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.