JVM env var on Docker: JAVA_TOOL_OPTIONS or JAVA_OPTS?

Hello,

I have a deployment using the official Docker image (metabase/metabase) and I'm a bit confused about which environment variable I should use to control JVM options. I see different references to JAVA_TOOL_OPTIONS and to JAVA_OPTS. My final goal is to pass something like -Xmx8g to it.

This section in the official documentation refers to using JAVA_OPTS: Running Metabase

But for example, the configuration for CI runs in the repository uses JAVA_TOOL_OPTIONS: metabase/config.yml at master · metabase/metabase · GitHub

Searching here on Discourse and on the Github issues, I see references to both.

Should I use them on different scenarios/deployment setups? Or did one setting replace the other in some version?

Thank you

Hi @fernandobrito
Use JAVA_OPTS, since that's used for Docker: https://github.com/metabase/metabase/blob/master/bin/docker/run_metabase.sh

Ah great, I missed finding this file on my search.

Thank you for your super quick response!