Skip to content

Commit f16fd27

Browse files
authored
Merge pull request #328 from DigitalSlideArchive/document-docker-auth
Document authorizing a docker repository
2 parents 6c684fc + 36395b1 commit f16fd27

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

README.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ Adding Docker Tasks
4747

4848
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``.
4949

50+
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.
51+
5052
Funding
5153
-------
5254
This work was funded in part by the `NIH grant U24-CA194362-01 <http://grantome.com/grant/NIH/U24-CA194362-01>`_.

devops/dsa/docker-compose.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ services:
2828
DSA_GIRDER_MOUNT_OPTIONS: ${DSA_GIRDER_MOUNT_OPTIONS:-}
2929
# You can also set girder settings here:
3030
# GIRDER_SETTING_CORE_HTTP_ONLY_COOKIES: true
31+
# If you want to authorize docker image repositories on the host machine
32+
# and have them accessed without further authorization within Girder,
33+
# you can specify a docker config location, mount it (see volumes,
34+
# below), and do "docker login <repo>" on the host machine before
35+
# starting the DSA.
36+
# DOCKER_CONFIG: /.docker
3137
restart: unless-stopped
3238
# Set DSA_PORT to expose the interface on another port (default 8080).
3339
ports:
@@ -53,6 +59,9 @@ services:
5359
# - /opt/HistomicsUI/histomicsui.egg-info
5460
# - ../../../HistomicsUI:/opt/HistomicsUI
5561

62+
# See comments about authorizing docker repositories above
63+
# - /home/<user directory>/.docker:/.docker:ro
64+
5665
# Add additional mounts here to get access to existing files on your
5766
# system. Also add them to the worker container to reduce copying.
5867
depends_on:
@@ -140,6 +149,9 @@ services:
140149
DSA_WORKER_CONCURRENCY: ${DSA_WORKER_CONCURRENCY:-2}
141150
DSA_PROVISION_YAML: ${DSA_PROVISION_YAML:-/opt/digital_slide_archive/devops/dsa/provision.yaml}
142151
TMPDIR:
152+
153+
# See comments about authorizing docker repositories above
154+
# DOCKER_CONFIG: /.docker
143155
restart: unless-stopped
144156
volumes:
145157
# Needed to use slicer_cli_web to run docker containers
@@ -153,6 +165,10 @@ services:
153165
- ./start_worker.sh:/opt/digital_slide_archive/devops/dsa/start_worker.sh
154166
# Needed to allow transferring data to slicer_cli_web docker containers
155167
- ${TMPDIR:-/tmp}:${TMPDIR:-/tmp}
168+
169+
# See comments about authorizing docker repositories above
170+
# - /home/<user directory>/.docker:/.docker:ro
171+
156172
# Add additional mounts here to get access to existing files on your
157173
# system if they have the same path as on the girder container.
158174
depends_on:

0 commit comments

Comments
 (0)