@@ -614,9 +614,10 @@ ensure that the credentials needed to access the image are available to
614614A build might be run as the ``root `` user, e.g. via ``sudo ``, or under
615615your 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+
637646If you are running the build under your account via the ``--fakeroot ``
638647feature you do not need to specially set credentials for the root user.
639648
0 commit comments