Skip to content

Commit 8444c31

Browse files
author
preminger
authored
build: doc'n support for --authfile flag (#219)
* add doc'n of SINGULARITY_AUTHFILE * note abt relation btw (SINGULARITY_)DOCKER_xyz envvars and --authfile * added mentioned of --authfile to "Authentication During a Build"
1 parent 8ac1e97 commit 8444c31

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

singularity_and_docker.rst

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -614,9 +614,10 @@ ensure that the credentials needed to access the image are available to
614614
A build might be run as the ``root`` user, e.g. via ``sudo``, or under
615615
your own account with ``--fakeroot``.
616616

617-
If you are running the build as ``root``, using ``sudo``, then any
618-
stored credentials or environment variables must be available to the
619-
``root`` user:
617+
If you are running the build as ``root``, using ``sudo``, then any stored
618+
credentials or environment variables must be available to the ``root`` user. You
619+
can make the credentials available to the ``root`` user in one of the following
620+
ways:
620621

621622
- Use the ``--docker-login`` flag for a one-time interactive login.
622623
I.E. run ``sudo singularity build --docker-login myimage.sif
@@ -634,6 +635,14 @@ stored credentials or environment variables must be available to the
634635
- Use ``sudo docker login`` if ``docker`` is on your machine. This is
635636
separate from storing the credentials under your own account.
636637

638+
- Store the credentials in a custom file on your filesystem using the
639+
``registry login --authfile <path>`` subcommand, and then pass the same
640+
``--authfile <path>`` flag to the ``build`` command. Note, however, that this
641+
will store the relevant credentials unencrypted in the specified file, so
642+
appropriate care must be taken concerning the location, ownership, and
643+
permissions of this file. See the :ref:`documentation of the --authfile flag
644+
<sec:authfile>` for more information.
645+
637646
If you are running the build under your account via the ``--fakeroot``
638647
feature you do not need to specially set credentials for the root user.
639648

0 commit comments

Comments
 (0)