Skip to content

Commit f73917d

Browse files
committed
Document changes to FUSE / temporary sandbox behaviour
Remove `--sif-fuse` mentions (deprecated experimental functionality). FUSE attempted before temp sandbox extraction. `--tmp-sandbox` flag to force extraction. Fixes #228 Fixes #227 Fixes #225
1 parent ea5df6d commit f73917d

File tree

3 files changed

+30
-29
lines changed

3 files changed

+30
-29
lines changed

appendix.rst

+8-4
Original file line numberDiff line numberDiff line change
@@ -352,8 +352,8 @@ below with their respective functionality.
352352

353353
#. **SINGULARITY_NO_TMP_SANDBOX**: Set to true to disable fall-back approach of
354354
extracting a container to a temporary sandbox when SIF / OCI-SIF mounts
355-
cannot be used. Default is false. Also configurable via ``tmp sandbox`` in
356-
``singularity.conf``.
355+
cannot be used. Default is false. Temporary sandboxes may also be disabled
356+
permanently by setting ``tmp sandbox = no`` in ``singularity.conf``.
357357

358358
``O``
359359
=====
@@ -428,9 +428,9 @@ below with their respective functionality.
428428
#. **SINGULARITY_SHELL**: The path to the program to be used as an
429429
interactive shell.
430430

431-
#. **SINGULARITY_SIF_FUSE**: (experimental) Set to true to attempt to
431+
#. **SINGULARITY_SIF_FUSE**: (deprecated) Set to true to attempt to
432432
mount SIF images with ``squashfuse`` in unprivileged user namespace
433-
workflows.
433+
workflows. This is now the default behaviour from {Singularity} 4.1.
434434

435435
#. **SINGULARITY_SIGNAL**: Specifies the signal to send to an instance with
436436
``singularity instance stop``.
@@ -444,6 +444,10 @@ below with their respective functionality.
444444
``T``
445445
=====
446446

447+
#. **SINGULARITY_TMP_SANDBOX**: Set to true to force fall-back approach of
448+
extracting a container to a temporary sandbox, even direct when SIF / OCI-SIF
449+
mounts could be used. Default is false.
450+
447451
#. **SINGULARITY_TEST**: Specifies the test script for the image.
448452

449453
#. **SINGULARITY_TMPDIR**: Specify a location for temporary files to be used

security.rst

+15-20
Original file line numberDiff line numberDiff line change
@@ -110,26 +110,21 @@ In this mode *all* operations run as the user who starts the
110110
``singularity`` program. However, there are some disadvantages to this
111111
approach:
112112

113-
- SIF and other single-file container images cannot be mounted
114-
directly. The container image must be extracted to a directory on
115-
disk to run. This impacts the speed of execution. As a result,
116-
workloads accessing large numbers of small files (as is the case with
117-
python application startup, for example) do not benefit from the
118-
reduced metadata load on the filesystem an image file provides.
119-
120-
{Singularity} 3.10 introduces experimental functionality to avoid
121-
this image-extraction by mounting the SIF container using
122-
``squashfuse``, if available on your system. You can enable this with
123-
the ``--sif-fuse`` flag, or by setting ``sif fuse`` in
124-
``singularity.conf``.
125-
126-
- Replacing direct kernel mounts with a FUSE approach is likely to
127-
cause a significant reduction in performance.
128-
129-
- The effectiveness of signing and verifying container images is
130-
reduced as, when extracted to a directory, modification of files is
131-
possible and verification of the image's original signature cannot be
132-
performed.
113+
- SIF and other single-file container images cannot be mounted using kernel
114+
mounts. {Singularity} will attempt to mount them in user space, using FUSE.
115+
If this is not possible, the container image must be extracted to a directory
116+
on disk to run. This impacts the speed of execution. As a result, workloads
117+
accessing large numbers of small files (as is the case with python
118+
application startup, for example) do not benefit from the reduced metadata
119+
load on the filesystem an image file provides. To force extraction to disk,
120+
instead of FUSE mount, use the ``--tmp-sandbox`` flag. To ensure containers
121+
are not extracted to disk, even when FUSE mounts fail, use the
122+
``--no-tmp-sandbox`` flag.
123+
124+
- The effectiveness of signing and verifying container images is reduced. With
125+
both FUSE mounts, and sandbox directories, the content of the container can
126+
easily be modified at runtime and verification against the image's original
127+
signature cannot be performed.
133128

134129
- Encryption is not supported. {Singularity} leverages kernel LUKS2
135130
mounts to run encrypted containers without writing a decrypted

singularity_and_docker.rst

+7-5
Original file line numberDiff line numberDiff line change
@@ -1051,11 +1051,13 @@ enable some of the extra namespaces that Docker uses, with flags:
10511051
container networking from the host.
10521052

10531053
- ``--userns / -u`` runs the container unprivileged, inside a user namespace
1054-
and avoiding {Singularity}'s setuid setup code. By default, SIF container
1055-
images will be extracted to disk, as mounting the container filesystem from
1056-
the SIF requires privilege. An experimental ``--sif-fuse`` flag can be used
1057-
to perform a mount with ``squashfuse`` instead, if it is available on your
1058-
system.
1054+
and avoiding {Singularity}'s setuid setup code. By default, container images
1055+
will be mounted in user space using FUSE. If this is not possible, they will
1056+
be extracted to disk, as mounting the container filesystem from the image
1057+
using kernel mounts requires privilege. To force extraction to disk, instead
1058+
of FUSE mount, use the ``--tmp-sandbox`` flag. To ensure containers are not
1059+
extracted to disk, even when FUSE mounts fail, use the ``--no-tmp-sandbox``
1060+
flag.
10591061

10601062
- ``--uts`` creates a new UTS namespace, which allows a different
10611063
hostname and/or NIS domain for the container.

0 commit comments

Comments
 (0)