Skip to content

Commit

Permalink
add multiple env-file
Browse files Browse the repository at this point in the history
Signed-off-by: jason yang <[email protected]>
  • Loading branch information
jason yang committed Feb 13, 2025
1 parent 8075784 commit 5454884
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions environment_and_metadata.rst
Original file line number Diff line number Diff line change
Expand Up @@ -273,17 +273,28 @@ variables include special characters.
``--env-file`` option
=====================

The ``--env-file`` option lets you provide a file that contains
The ``--env-file`` option lets you provide multiple files that contain
environment variables as ``NAME=VALUE`` pairs, e.g.:

.. code::
$ cat myenvs
MYVAR="Hello from a file"
$ {command} run --env-file myenvs env.sif
$ cat myenvs2
MYVAR="Hello from a file 2"
$ {command} run --env-file myenvs --env-file myenvs2 env.sif
Hello from a file 2
$ {command} run --env-file myenvs2,myenvs env.sif
Hello from a file
.. note::

Note that environment variables presented in the ``--env-file`` file will
always overwrite the same variables defined in the former file.

``{ENVPREFIX}ENV_`` prefix
==========================

Expand Down

0 comments on commit 5454884

Please sign in to comment.