Skip to content

Commit 2e57045

Browse files
GodloveDvsoch
authored andcommitted
clarified user binding (hopefully) (#48)
* clarified user binding * realized that some of my clarification was obfuscation and tried again * modified the example for successful binding
1 parent ec8c673 commit 2e57045

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

pages/docs/admin-docs/advanced-config.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ The syntax for this consists of a bind path source and an optional bind path des
4646
### USER BIND CONTROL (boolean, default='yes')
4747
In addition to the system bind points as specified within this configuration file, you may also allow users to define their own bind points inside the container. This feature is used via multiple command line arguments (e.g. `--bind`, `--scratch`, and `--home`) so disabling user bind control will also disable those command line options.
4848

49-
Singularity will automatically disable this feature if the host does not support the prctl option `PR_SET_NO_NEW_PRIVS`.
49+
Singularity will automatically disable this feature if the host does not support the prctl option `PR_SET_NO_NEW_PRIVS`. In addition, `enable overlay` must be set to `yes` and the host system must support overlayFS (generally kernel versions 3.18 and later) for users to bind host directories to bind points that do not already exist in the container.
5050

5151

5252
## Logging

pages/docs/user-docs/docs-bind-paths.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,16 @@ The system administrator has the ability to define what bind points will be incl
3838

3939

4040
#### User defined bind points
41-
If the system administrator has enabled user control of binds (via `user bind control = yes` in `/etc/singularity/singularity.conf`), you will be able to request your own bind points within your container processes. The most typical example of this is the `--bind` option and here is an example binding `/tmp` to `/scratch` (which again does not exist within the container):
41+
If the system administrator has enabled user control of binds (via `user bind control = yes` in `/etc/singularity/singularity.conf`), you will be able to request your own bind points within your container.
42+
43+
Further, if the administrator has enabled the use of file system overlay (via `enable overlay = yes` in `/etc/singularity/singularity.conf`), you can bind host system directories to directories that do not exist within the container. Singularity will dynamically create the necessary bind points in your container on demand. This feature may not be supported on older host systems.
44+
45+
Here's an example of using the `--bind` option and binding `/tmp` to `/scratch` (which may not already exist within the container if file system overlay is enabled):
4246

4347
```bash
4448
$ singularity shell -B /tmp:/scratch /tmp/Centos7-ompi.img
45-
WARNING: Skipping user bind, non existant bind point (directory) in container: '/scratch'
4649
Singularity: Invoking an interactive shell within container...
4750

48-
Singularity.Centos7-ompi.img>
51+
Singularity.Centos7-ompi.img> ls /scratch
52+
ssh-7vywtVeOez systemd-private-cd84c81dda754fe4a7a593647d5a5765-ntpd.service-12nMO4
4953
```

0 commit comments

Comments
 (0)