Most devs use #Docker or #Podman, but do you really understand what’s happening under the hood? Let’s demystify #Linux #containers in simple, concrete terms. Just a 12-min read!
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...
9 comments
[ 4.3 ms ] story [ 20.4 ms ] threadI 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.