Host Mounts#
Host directories can be mounted from the node to a task’s container image before the task is started. Here are some examples:
workflow:
name: "host-mount"
tasks:
- name: task1
volumeMounts:
- /dev/shm # (1)
...
- name: task2
image: ubuntu
command: [sh]
args: [/tmp/run.sh]
files:
- contents: |
ls /home/opt
path: /tmp/run.sh
volumeMounts:
- /opt:/home/opt # (2)
Mount the
/dev/shmdirectory from the node to the task container, allowing it to use shared memory.Mount the
/optdirectory from the node to the/home/optdirectory in the task container, allowing it to access the/optdirectory.
Note
The default list of host directories that are allowed to be mounted in your task for each type of pool and platform can be configured but requires service-level configuration. If you have administrative access, you can enable this directly. Otherwise, contact someone with pool administration privileges.