I noticed the command docker build
has a parameter --shm-size bytes
which uses to set the size of /dev/shm. But I don't know why the docker build
needs to use the shared memory.
The docker build
command just follows the Dockerfile and run a set of intermediate containers to build the target container environments and commit them as an image. In this process, all parameters and commands in Dockerfile are resolved and packaged as a struct that passes in different components (docker client, docker daemon, containerd, runc ...) . It seems that docker build
doesn't need a shared memory to pass the information.
But why docker build
provides this parameter --shm-size bytes
? And maybe I have some misunderstanding about this process. Please correct me. Thanks!