Skip to content

Commit 507ff15

Browse files
documenting extended syntax for aliases in recipes
1 parent 2ac8fe4 commit 507ff15

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

docs/getting_started/developer-guide.rst

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,29 @@ The above shows the simplest form of representing an alias, where each is
159159
a key (python) and value (/usr/local/bin/python) set.
160160

161161

162+
Aliases
163+
-------
164+
165+
Each recipe has an optional section for defining aliases in the modulefile; there are two ways of defining them. In the python sample recipe above the simple form is used, using key value pairs:
166+
167+
.. code-block:: yaml
168+
169+
aliases:
170+
python: /usr/local/bin/python
171+
172+
A second form is allowed, using dicts, in those cases where the command requires to specify custom options for the container runtime. For instance, suppose the python interpreter above requires an isolated shell environment (``--cleanenv`` in Singularity):
173+
174+
.. code-block:: yaml
175+
176+
aliases:
177+
- name: python
178+
command: /usr/local/bin/python
179+
options: --cleanenv
180+
181+
162182
Environment Variables
163183
---------------------
164184

165-
166185
Finally, each recipe has an optional section for environment variables. For
167186
example, the container ``vanessa/salad`` shows definition of one environment
168187
variable:

0 commit comments

Comments
 (0)