Skip to content

Commit

Permalink
Merge pull request #328 from DigitalSlideArchive/document-docker-auth
Browse files Browse the repository at this point in the history
Document authorizing a docker repository
  • Loading branch information
manthey authored Mar 25, 2024
2 parents 6c684fc + 36395b1 commit f16fd27
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ Adding Docker Tasks

Docker tasks conforming to the `slicer_cli_web <https://github.com/girder/slicer_cli_web>`_ module's requirements can be added. These tasks appear in the HistomicsUI interface and in the Girder interface. An administrator can add a Docker image by going to the slicer_cli_web plugin settings and entering the Docker image name there. For instance, to get the HistomicsTK tasks, add ``dsarchive/histomicstk:latest``.

To use a docker image from a docker repository that requires authentication, see the comments on how to pass through authenticaition in the ``docker-compose.yml`` file. On the host machine (and the worker machines if they are separate), login to the docker repository, saving credentials. This could be done with the command ``docker login <repository>`` which will then prompt for username and password. Other docker config values can be set this way, too.

Funding
-------
This work was funded in part by the `NIH grant U24-CA194362-01 <http://grantome.com/grant/NIH/U24-CA194362-01>`_.
16 changes: 16 additions & 0 deletions devops/dsa/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ services:
DSA_GIRDER_MOUNT_OPTIONS: ${DSA_GIRDER_MOUNT_OPTIONS:-}
# You can also set girder settings here:
# GIRDER_SETTING_CORE_HTTP_ONLY_COOKIES: true
# If you want to authorize docker image repositories on the host machine
# and have them accessed without further authorization within Girder,
# you can specify a docker config location, mount it (see volumes,
# below), and do "docker login <repo>" on the host machine before
# starting the DSA.
# DOCKER_CONFIG: /.docker
restart: unless-stopped
# Set DSA_PORT to expose the interface on another port (default 8080).
ports:
Expand All @@ -53,6 +59,9 @@ services:
# - /opt/HistomicsUI/histomicsui.egg-info
# - ../../../HistomicsUI:/opt/HistomicsUI

# See comments about authorizing docker repositories above
# - /home/<user directory>/.docker:/.docker:ro

# Add additional mounts here to get access to existing files on your
# system. Also add them to the worker container to reduce copying.
depends_on:
Expand Down Expand Up @@ -140,6 +149,9 @@ services:
DSA_WORKER_CONCURRENCY: ${DSA_WORKER_CONCURRENCY:-2}
DSA_PROVISION_YAML: ${DSA_PROVISION_YAML:-/opt/digital_slide_archive/devops/dsa/provision.yaml}
TMPDIR:

# See comments about authorizing docker repositories above
# DOCKER_CONFIG: /.docker
restart: unless-stopped
volumes:
# Needed to use slicer_cli_web to run docker containers
Expand All @@ -153,6 +165,10 @@ services:
- ./start_worker.sh:/opt/digital_slide_archive/devops/dsa/start_worker.sh
# Needed to allow transferring data to slicer_cli_web docker containers
- ${TMPDIR:-/tmp}:${TMPDIR:-/tmp}

# See comments about authorizing docker repositories above
# - /home/<user directory>/.docker:/.docker:ro

# Add additional mounts here to get access to existing files on your
# system if they have the same path as on the girder container.
depends_on:
Expand Down

0 comments on commit f16fd27

Please sign in to comment.