How can I set an environment variable in the docker file of my compute environment?
I would like to set something in my compute environment that is then accessible when I use that environment for a run or a workspace?
Answers
-
-
Note that if you just want something like a personal environment variable, and don't need it to necessary be set in the compute environment, you can use our instructions for setting environment variables at the project or user level:
https://support.dominodatalab.com/hc/en-us/articles/205536355-Domino-environment-variables
Katie
Field Data Scientist @ Domino
0 -
Is there a difference between using the docker ENV instruction and declaring an ARG with the environment variables section of the compute environment?
0 -
ENV and environment variables set with ARG are treated differently by Docker. The key difference is that ARG variables are used at build time and ENV variables are persisted in container created from the image. So if you only need a variable when building the image (e.g. in updating a compute environment), use ARG. If you need the variable available in your containers (e.g. when launching a Domino workspace from a compute environment), use ENV.
References:
Katie
Field Data Scientist @ Domino
0
Howdy, Stranger!