I cannot figure out how to set a different size for /dev/shm for a Docker image on the Cirrus CI for flutter/flutter.
Usually, when we run tests using Docker locally, we will run do either docker build --shm-size=1g or docker run --shm-size=1g (for example), in order to create a docker image with a larger /dev/shm size. This is necessary for many tests to pass, especially those using Google Chrome. But I cannot figure out how to set this option in Cirrus CI.
Our .cirrus.yml : https://github.com/flutter/flutter/blob/master/.cirrus.yml
Our Dockerfile : https://github.com/flutter/flutter/blob/master/dev/ci/docker_linux/Dockerfile
Thank you very much for your help!
Hey @pennzht,
Since you are directly using a container.dockerfile, it is being built on Cirrus's end with a certain set of docker arguments, which will not contain shm-size. It would need to be added for this to work, so @fkorotkov should be able to help further.
Just to clarify, Dockerfile builds fine with the default shmsize, you only need it bigger for running tests, right?
@fkorotkov
Just to clarify,
Dockerfilebuilds fine with the default shmsize, you only need it bigger for running tests, right?
Yes.
@fkorotkov
We need this larger shm-size to be a permanent change, because all future PRs will need to run these tests.
@pennzht a tmpfs disk should be mounted to /dev/shm now. Same as with in-memory disks it will count agains memory limits of your container.
@pennzht a
tmpfsdisk should be mounted to/dev/shmnow. Same as with in-memory disks it will count agains memory limits of your container.
Thanks for this!
@fkorotkov The benchmark tests are now passing! Thank you very much for your help!!
https://github.com/flutter/flutter/pull/62906