Skip to content

Commit 850f6b0

Browse files
committed
Add documentation about new env variable expansion in volume configs
1 parent 83cccea commit 850f6b0

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

docs/configuration.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,19 @@ of volume options:
166166
hostpath: /host/foo
167167
options: ro,cached
168168
169+
The keys used in volume mappings can contain environment variables **that are
170+
expanded in the host environment**. For example, this configuration would map
171+
the user's ``/home/username/.config/application1`` directory into the container
172+
at the same path.
173+
174+
.. code-block:: yaml
175+
176+
volumes:
177+
$TEST_HOME/.config/application1: $TEST_HOME/.config/application1
178+
179+
Note that because variable expansion is now applied to all volume keys, if one
180+
desires to have a key with an explicit ``$`` character, it must be written as
181+
``$$``.
169182

170183

171184
.. _conf_aliases:

0 commit comments

Comments
 (0)