I need to set up a SonarQube container on my Portainer instance. SonarQube uses Elasticsearch, which needs a kernel setting passed from the host. This issue is well documented, as mentioned in this question, but unfortunately the poster did not detail their solution.
Apparently, this issue can be fixed by running this on your host(?)
sysctl -w vm.max_map_count=262144
However, I'd like it if there were a way to specify this for this container only. Is such a thing possible, and how is it done in Portainer? I tried an environment variable, but it had no effect.