Expected behavior
--shm-size=XXX should set /dev/shm to the desired value
Actual behavior
any value for --shm-size sets the value to 64M, only
Information
- macOS Version: macOS Catalina 10.15.7
- docker for mac version: 2.4.0.0 (48506) Stable
Steps to reproduce the behavior
- Use the sample Dockerfile, that stores the allocated size inside /dev/shm during build time in a temp file that can be read on the container when running
FROM busybox
RUN df -kh /dev/shm > /tmp/output
CMD cat /tmp/output
- Build the image passing the
--shm-size tag
docker build --shm-size=1g -t test .
[+] Building 1.6s (6/6) FINISHED
=> [internal] load build definition from Dockerfile
=> => transferring dockerfile: 111B
=> [internal] load .dockerignore
=> => transferring context: 2B
=> [internal] load metadata for docker.io/library/busybox:latest
=> CACHED [1/2] FROM docker.io/library/busybox@sha256:a9286defaba7b3a519d585ba0e37d0b2cbee74ebfe590960b0b1d6a5e97d1e1d
=> [2/2] RUN df -kh /dev/shm > /tmp/output
=> exporting to image
=> => exporting layers
=> => writing image sha256:2f450e57281dca99454df4ad8becd0fcb2e1153470b5ed365aa946042d001605
=> => naming to docker.io/library/test
- Run the generated image, which will print the size of /dev/shm stored in the temporary text file during build
docker run test
Filesystem Size Used Available Use% Mounted on
shm 64.0M 0 64.0M 0% /dev/shm
Tried with different values for the --shm-size parameter, but in all cases only 64M is allocated to /dev/shm.
Expected behavior
--shm-size=XXXshould set /dev/shm to the desired valueActual behavior
any value for
--shm-sizesets the value to 64M, onlyInformation
Steps to reproduce the behavior
--shm-sizetagTried with different values for the
--shm-sizeparameter, but in all cases only 64M is allocated to /dev/shm.