Skip to content

Commit

Permalink
Merge pull request #214 from JonathonReinhart/fix-docs-for-volume-env…
Browse files Browse the repository at this point in the history
…vars

docs: Correct docs regarding the use of env vars in volumes
  • Loading branch information
JonathonReinhart authored Sep 9, 2023
2 parents b93cf89 + d16b50d commit dd24898
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions docs/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -166,23 +166,28 @@ of volume options:
hostpath: /host/foo
options: ro,cached
The keys used in volume mappings can contain environment variables **that are
expanded in the host environment**. For example, this configuration would map
the user's ``/home/username/.config/application1`` directory into the container
at the same path.
The paths (host or container) used in volume mappings can contain environment
variables **which are expanded in the host environment**. For example, this
configuration would map the user's ``/home/username/.config/application1``
directory into the container at the same path.

.. code-block:: yaml
volumes:
$TEST_HOME/.config/application1: $TEST_HOME/.config/application1
Note that because variable expansion is now applied to all volume keys, if one
desires to have a key with an explicit ``$`` character, it must be written as
``$$``.
If a referenced environment variable is not set, Scuba exits with a
configuration error.

Volume host directories which do not already exist are created as the current
user before creating the container.

.. note::
Because variable expansion is now applied to all volume paths, if one
desires to use a literal ``$`` character in a path, it must be written as
``$$``.


.. _conf_aliases:

``aliases``
Expand Down

0 comments on commit dd24898

Please sign in to comment.