I am running Selenium Standalone Firefox as Azure Container Instance. To solve the error that often occurs when running protractor tests "failed to decode response from marionette" I need to increase shared memory of the container.
It is not possible to pass it as a parameter to az container create command that I am using in my pipeline.
I tried to pass it as command line script to be executed after the container is deployed --command-line "/bin/sh -c 'sudo mount -o remount,size=2G /dev/shm'" but it does not work because the container is read-only, and unfortunately, according to https://feedback.azure.com/forums/602224-azure-container-instances/suggestions/33870166-aci-support-for-privileged-container it is not possible to run container instance in privileged mode to allow write-mode.
Do you have any ideas ? Thanks, Magda
This is not supported and would be very hard to support since it opens a lot of risk for the VM running the different container groups.
The underlying memory/CPU is shared with other users, allowing extra /DEV/SHM could potentially hide the real memory usage of the container hence affecting other containers running on the same now.
This request has been made in the past. see below.
I would suggest to look at the Kubernetes alternative, it supports emptyDir with medium type: memory
, which would be creating the right temps directory for your need.
you can set the emptyDir.medium field to "Memory" to tell Kubernetes to mount a tmpfs (RAM-backed filesystem) for you instead. While tmpfs is very fast, be aware that unlike disks, tmpfs is cleared on node reboot and any files you write will count against your Container’s memory limit.
https://kubernetes.io/docs/concepts/storage/volumes/#emptydir