annotate Sphinx/source/users/docker.rst @ 1113:a588960a72e5 default tip

spelling
author Alain Mazy <am@orthanc.team>
date Mon, 28 Oct 2024 09:23:08 +0100
parents 689c27b34bd6
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
54
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 .. _docker:
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 .. highlight:: bash
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4
882
815f70009ec2 highlight osimis/orthanc docker images since jodogne/orthanc images are currently not up-to-date
Alain Mazy <am@osimis.io>
parents: 866
diff changeset
5 jodogne/orthanc Docker images
815f70009ec2 highlight osimis/orthanc docker images since jodogne/orthanc images are currently not up-to-date
Alain Mazy <am@osimis.io>
parents: 866
diff changeset
6 =============================
54
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7
481
4f076a3b9934 unanswered-forum.rst
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 461
diff changeset
8 .. toctree::
4f076a3b9934 unanswered-forum.rst
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 461
diff changeset
9 :hidden:
4f076a3b9934 unanswered-forum.rst
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 461
diff changeset
10
1023
5d4701d8fe28 replaced osimis/orthanc by orthancteam/orthanc
Alain Mazy <am@osimis.io>
parents: 1021
diff changeset
11 docker-orthancteam.rst
481
4f076a3b9934 unanswered-forum.rst
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 461
diff changeset
12
4f076a3b9934 unanswered-forum.rst
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 461
diff changeset
13
54
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 .. contents::
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 :depth: 3
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 Introduction
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 ------------
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21 `Docker images <https://en.wikipedia.org/wiki/Docker_(software)>`__
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 for the Orthanc core and its official plugins are freely available on
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 the `DockerHub platform <https://hub.docker.com/u/jodogne/>`__. The
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 source code of the corresponding Docker images is available on `GitHub
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 <https://github.com/jodogne/OrthancDocker>`__.
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26
1102
4f3709b36f8a clarifying docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1099
diff changeset
27
4f3709b36f8a clarifying docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1099
diff changeset
28 .. _docker-jodogne-vs-orthanc-team:
4f3709b36f8a clarifying docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1099
diff changeset
29
1109
689c27b34bd6 docker comparisons
Alain Mazy <am@orthanc.team>
parents: 1102
diff changeset
30 ``jodogne/orthanc`` vs. ``orthancteam/orthanc`` Docker images
689c27b34bd6 docker comparisons
Alain Mazy <am@orthanc.team>
parents: 1102
diff changeset
31 -------------------------------------------------------------
1102
4f3709b36f8a clarifying docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1099
diff changeset
32
4f3709b36f8a clarifying docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1099
diff changeset
33 Two different flavors of Docker images for Orthanc are available:
229
c74f044dc3ce note about docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 220
diff changeset
34
1109
689c27b34bd6 docker comparisons
Alain Mazy <am@orthanc.team>
parents: 1102
diff changeset
35 * The ``jodogne/orthanc`` and ``jodogne/orthanc-plugins`` Docker images that are
689c27b34bd6 docker comparisons
Alain Mazy <am@orthanc.team>
parents: 1102
diff changeset
36 described on this page are regularly kept in sync with the latest releases of
689c27b34bd6 docker comparisons
Alain Mazy <am@orthanc.team>
parents: 1102
diff changeset
37 the Orthanc project, with a basic configuration system that is inherited from
689c27b34bd6 docker comparisons
Alain Mazy <am@orthanc.team>
parents: 1102
diff changeset
38 the Debian packages (i.e., manual edition of the configuration files).
689c27b34bd6 docker comparisons
Alain Mazy <am@orthanc.team>
parents: 1102
diff changeset
39
689c27b34bd6 docker comparisons
Alain Mazy <am@orthanc.team>
parents: 1102
diff changeset
40 This is also where the new experimental features from `Sébastien Jodogne's
689c27b34bd6 docker comparisons
Alain Mazy <am@orthanc.team>
parents: 1102
diff changeset
41 research team at UCLouvain <https://orthanc.uclouvain.be/>`__ are initially
689c27b34bd6 docker comparisons
Alain Mazy <am@orthanc.team>
parents: 1102
diff changeset
42 released. The binaries used in these images correspond to the Linux Standard
689c27b34bd6 docker comparisons
Alain Mazy <am@orthanc.team>
parents: 1102
diff changeset
43 Base binaries.
689c27b34bd6 docker comparisons
Alain Mazy <am@orthanc.team>
parents: 1102
diff changeset
44
689c27b34bd6 docker comparisons
Alain Mazy <am@orthanc.team>
parents: 1102
diff changeset
45 The default user interface is the built-in **Orthanc Explorer**.
689c27b34bd6 docker comparisons
Alain Mazy <am@orthanc.team>
parents: 1102
diff changeset
46
689c27b34bd6 docker comparisons
Alain Mazy <am@orthanc.team>
parents: 1102
diff changeset
47 These images are most useful to **software developers and researchers**.
229
c74f044dc3ce note about docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 220
diff changeset
48
1027
60b0b7ea409b migration to orthancteam
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1023
diff changeset
49 * Our commercial partner `Orthanc Team <https://orthanc.team/>`__ also
1102
4f3709b36f8a clarifying docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1099
diff changeset
50 `publishes separate Docker images
1109
689c27b34bd6 docker comparisons
Alain Mazy <am@orthanc.team>
parents: 1102
diff changeset
51 <https://hub.docker.com/r/orthancteam/orthanc>`__.
689c27b34bd6 docker comparisons
Alain Mazy <am@orthanc.team>
parents: 1102
diff changeset
52
689c27b34bd6 docker comparisons
Alain Mazy <am@orthanc.team>
parents: 1102
diff changeset
53 These ``orthancteam/orthanc`` images are released 2 or 3 times a month every
689c27b34bd6 docker comparisons
Alain Mazy <am@orthanc.team>
parents: 1102
diff changeset
54 time a new version of a plugin or Orthanc is available or every time the base
689c27b34bd6 docker comparisons
Alain Mazy <am@orthanc.team>
parents: 1102
diff changeset
55 Debian image needs to be updated for security reasons.
689c27b34bd6 docker comparisons
Alain Mazy <am@orthanc.team>
parents: 1102
diff changeset
56
689c27b34bd6 docker comparisons
Alain Mazy <am@orthanc.team>
parents: 1102
diff changeset
57 Each image has a tag and the `list of each component version is documented
689c27b34bd6 docker comparisons
Alain Mazy <am@orthanc.team>
parents: 1102
diff changeset
58 <https://hub.docker.com/r/orthancteam/orthanc>`__.
689c27b34bd6 docker comparisons
Alain Mazy <am@orthanc.team>
parents: 1102
diff changeset
59
689c27b34bd6 docker comparisons
Alain Mazy <am@orthanc.team>
parents: 1102
diff changeset
60 These images support both AMD64 and ARM64 architectures.
689c27b34bd6 docker comparisons
Alain Mazy <am@orthanc.team>
parents: 1102
diff changeset
61
689c27b34bd6 docker comparisons
Alain Mazy <am@orthanc.team>
parents: 1102
diff changeset
62 These images can be configured using congirutation files or **environment
689c27b34bd6 docker comparisons
Alain Mazy <am@orthanc.team>
parents: 1102
diff changeset
63 variables** (which is very handy if using Docker Compose or Kubernetes).
689c27b34bd6 docker comparisons
Alain Mazy <am@orthanc.team>
parents: 1102
diff changeset
64
689c27b34bd6 docker comparisons
Alain Mazy <am@orthanc.team>
parents: 1102
diff changeset
65 The default user interface is the **Orthanc Explorer 2** :ref:`plugin
689c27b34bd6 docker comparisons
Alain Mazy <am@orthanc.team>
parents: 1102
diff changeset
66 <orthanc-explorer-2>`.
689c27b34bd6 docker comparisons
Alain Mazy <am@orthanc.team>
parents: 1102
diff changeset
67
689c27b34bd6 docker comparisons
Alain Mazy <am@orthanc.team>
parents: 1102
diff changeset
68 These images are targeted at **ops teams and end-users**.
689c27b34bd6 docker comparisons
Alain Mazy <am@orthanc.team>
parents: 1102
diff changeset
69
689c27b34bd6 docker comparisons
Alain Mazy <am@orthanc.team>
parents: 1102
diff changeset
70 A :ref:`specific page <docker-orthancteam>` is available to describe how these
689c27b34bd6 docker comparisons
Alain Mazy <am@orthanc.team>
parents: 1102
diff changeset
71 images should be used.
229
c74f044dc3ce note about docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 220
diff changeset
72
c74f044dc3ce note about docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 220
diff changeset
73 **Note for CentOS users:** The Docker environment might be difficult to
54
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
74 configure on your platform. Hints are available on the `Orthanc Users
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
75 discussion group
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
76 <https://groups.google.com/d/msg/orthanc-users/w-uPAknnRQc/-XhzBGSCAwAJ>`__.
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
77
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
78
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
79 Running the Orthanc core
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
80 ------------------------
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
81
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
82 The following command will start the core of Orthanc, with all the
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
83 plugins disabled::
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
84
363
9c28eeab2db6 removed sudo from docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 358
diff changeset
85 $ docker run -p 4242:4242 -p 8042:8042 --rm jodogne/orthanc
54
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
86
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
87 Once Orthanc is running, use Mozilla Firefox at URL
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
88 http://localhost:8042/ to interact with Orthanc. The default username
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
89 is ``orthanc`` and its password is ``orthanc``.
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
90
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
91 The command above starts the mainline version of Orthanc, whose
69
03d35f985f26 update docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 54
diff changeset
92 development is in continuous progress. Do not forget to regularly
03d35f985f26 update docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 54
diff changeset
93 update the Docker image to benefit from the latest features::
03d35f985f26 update docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 54
diff changeset
94
363
9c28eeab2db6 removed sudo from docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 358
diff changeset
95 $ docker pull jodogne/orthanc
69
03d35f985f26 update docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 54
diff changeset
96
03d35f985f26 update docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 54
diff changeset
97 If more stability is required, you can select the official release of
03d35f985f26 update docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 54
diff changeset
98 Orthanc to be run::
54
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
99
1075
d2be251975d1 Orthanc 1.12.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1027
diff changeset
100 $ docker run -p 4242:4242 -p 8042:8042 --rm jodogne/orthanc:1.12.4
54
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
101
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
102 Passing additional command-line options (e.g. to make Orthanc verbose)
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
103 can be done as follows (note the ``/etc/orthanc`` option that is
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
104 required for Orthanc to find its configuration files)::
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
105
1075
d2be251975d1 Orthanc 1.12.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1027
diff changeset
106 $ docker run -p 4242:4242 -p 8042:8042 --rm jodogne/orthanc:1.12.4 /etc/orthanc --verbose
54
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
107
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
108
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
109 Usage, with plugins enabled
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
110 ---------------------------
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
111
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
112 The following command will run the mainline version of the Orthanc
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
113 core, together with its :ref:`Web viewer <webviewer>`, its
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
114 :ref:`PostgreSQL support <postgresql>`, its :ref:`DICOMweb
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
115 implementation <dicomweb>`, and its :ref:`whole-slide imaging viewer
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
116 <wsi>`::
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
117
363
9c28eeab2db6 removed sudo from docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 358
diff changeset
118 $ docker run -p 4242:4242 -p 8042:8042 --rm jodogne/orthanc-plugins
54
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
119
365
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 364
diff changeset
120 Or you can also start a specific version of Orthanc for more stability::
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 364
diff changeset
121
1075
d2be251975d1 Orthanc 1.12.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1027
diff changeset
122 $ docker run -p 4242:4242 -p 8042:8042 --rm jodogne/orthanc-plugins:1.12.4
365
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 364
diff changeset
123
364
234de55ed125 usage of the python plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 363
diff changeset
124 If you have an interest in the :ref:`Python plugin <python-plugin>`,
234de55ed125 usage of the python plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 363
diff changeset
125 you can use the ``orthanc-python`` image. The latter image is a
234de55ed125 usage of the python plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 363
diff changeset
126 heavier version of the ``orthanc-plugins`` image, as it embeds the
234de55ed125 usage of the python plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 363
diff changeset
127 Python 3.7 interpreter. Here is how to start this image::
234de55ed125 usage of the python plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 363
diff changeset
128
365
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 364
diff changeset
129 $ docker run -p 4242:4242 -p 8042:8042 --rm jodogne/orthanc-python
1075
d2be251975d1 Orthanc 1.12.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1027
diff changeset
130 $ docker run -p 4242:4242 -p 8042:8042 --rm jodogne/orthanc-python:1.12.4
364
234de55ed125 usage of the python plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 363
diff changeset
131
54
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
132
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
133 Fine-tuning the configuration
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
134 -----------------------------
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
135
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
136 For security reasons, you should at least protect your instance of
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
137 Orthanc by changing this default user, in the ``RegisteredUsers``
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
138 :ref:`configuration option <configuration>`. You will also probably
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
139 need to fine-tune other parameters, notably the list of the DICOM
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
140 modalities Orthanc knows about.
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
141
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
142 You can generate a custom configuration file for Orthanc as follows::
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
143
1075
d2be251975d1 Orthanc 1.12.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1027
diff changeset
144 $ docker run --rm --entrypoint=cat jodogne/orthanc:1.12.4 /etc/orthanc/orthanc.json > /tmp/orthanc.json
54
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
145
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
146 Then, edit the just-generated file ``/tmp/orthanc.json`` and restart
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
147 Orthanc with your updated configuration::
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
148
1075
d2be251975d1 Orthanc 1.12.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1027
diff changeset
149 $ docker run -p 4242:4242 -p 8042:8042 --rm -v /tmp/orthanc.json:/etc/orthanc/orthanc.json:ro jodogne/orthanc:1.12.4
54
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
150
384
e4b0a4d69f42 note about memory usage
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 382
diff changeset
151 *Remark:* These Docker images automatically set the environment
e4b0a4d69f42 note about memory usage
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 382
diff changeset
152 variable ``MALLOC_ARENA_MAX`` to ``5`` in order to :ref:`control
e4b0a4d69f42 note about memory usage
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 382
diff changeset
153 memory usage <scalability-memory>`. This default setting can be
e4b0a4d69f42 note about memory usage
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 382
diff changeset
154 overriden by providing the option ``-e MALLOC_ARENA_MAX=1`` when
386
801db4e1828c default
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 384
diff changeset
155 invoking ``docker run`` (the value ``0`` corresponds to the default
801db4e1828c default
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 384
diff changeset
156 value).
384
e4b0a4d69f42 note about memory usage
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 382
diff changeset
157
54
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
158
382
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
159 .. _docker-compose:
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
160
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
161 Configuration management using Docker Compose
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
162 ---------------------------------------------
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
163
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
164 Depending on the context, the `Docker Compose tool
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
165 <https://docs.docker.com/compose/>`__ might be easier to use than the
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
166 plain Docker tool, as it allows replacing long command lines as above,
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
167 by plain configuration files. The trick here is to provide the JSON
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
168 configuration files to Orthanc as `secrets
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
169 <https://docs.docker.com/compose/compose-file/#secrets>`__ (note that
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
170 the related option ``configs`` could in theory be better,
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
171 unfortunately it is only available to `Docker Swarm
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
172 <https://github.com/docker/compose/issues/5110>`__).
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
173
673
767c2550fa00 environment variable in docker compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 638
diff changeset
174 .. highlight:: yaml
382
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
175
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
176 First create the ``docker-compose.yml`` file as follows (this one uses
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
177 the `YAML file format <https://en.wikipedia.org/wiki/YAML>`__)::
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
178
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
179 version: '3.1' # Secrets are only available since this version of Docker Compose
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
180 services:
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
181 orthanc:
1075
d2be251975d1 Orthanc 1.12.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1027
diff changeset
182 image: jodogne/orthanc-plugins:1.12.4
382
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
183 command: /run/secrets/ # Path to the configuration files (stored as secrets)
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
184 ports:
402
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 396
diff changeset
185 - 4242:4242
382
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
186 - 8042:8042
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
187 secrets:
673
767c2550fa00 environment variable in docker compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 638
diff changeset
188 - orthanc.json
767c2550fa00 environment variable in docker compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 638
diff changeset
189 environment:
767c2550fa00 environment variable in docker compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 638
diff changeset
190 - ORTHANC_NAME=HelloWorld
382
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
191 secrets:
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
192 orthanc.json:
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
193 file: orthanc.json
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
194
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
195 .. highlight:: json
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
196
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
197 Then, place the configuration file ``orthanc.json`` next to the
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
198 ``docker-compose.yml`` file. Here is a minimalist ``orthanc.json``::
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
199
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
200 {
673
767c2550fa00 environment variable in docker compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 638
diff changeset
201 "Name" : "${ORTHANC_NAME} in Docker Compose",
382
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
202 "RemoteAccessAllowed" : true
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
203 }
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
204
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
205 .. highlight:: bash
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
206
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
207 This single configuration file should contain all the required
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
208 configuration options for Orthanc and all its plugins. The container
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
209 can then be started as follows::
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
210
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
211 $ docker-compose up
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
212
673
767c2550fa00 environment variable in docker compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 638
diff changeset
213 Note how the `environment variable
767c2550fa00 environment variable in docker compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 638
diff changeset
214 <https://docs.docker.com/compose/environment-variables/>`__
767c2550fa00 environment variable in docker compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 638
diff changeset
215 ``ORTHANC_NAME`` has been used in order to easily adapt the
767c2550fa00 environment variable in docker compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 638
diff changeset
216 configuration of Orthanc. This results from the fact that Orthanc
767c2550fa00 environment variable in docker compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 638
diff changeset
217 injects :ref:`environment variables <orthanc-environment-variables>`
767c2550fa00 environment variable in docker compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 638
diff changeset
218 once reading the content of its configuration files (since Orthanc
767c2550fa00 environment variable in docker compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 638
diff changeset
219 1.5.0).
382
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
220
673
767c2550fa00 environment variable in docker compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 638
diff changeset
221
54
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
222 Making the Orthanc database persistent
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
223 --------------------------------------
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
224
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
225 The filesystem of Docker containers is volatile (its content is
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
226 deleted once the container stops). You can make the Orthanc database
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
227 persistent by mapping the ``/var/lib/orthanc/db`` folder of the
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
228 container to some path in the filesystem of your Linux host, e.g.::
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
229
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
230 $ mkdir /tmp/orthanc-db
1075
d2be251975d1 Orthanc 1.12.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1027
diff changeset
231 $ docker run -p 4242:4242 -p 8042:8042 --rm -v /tmp/orthanc-db/:/var/lib/orthanc/db/ jodogne/orthanc:1.12.4
54
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
232
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
233
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
234 Whole-slide imaging support
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
235 ---------------------------
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
236
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
237 The ``orthanc-plugins`` image includes support for :ref:`microscopic
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
238 whole-slide imaging (WSI) <wsi>`. For instance, the following command
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
239 will start the WSI viewer plugin transparently together with Orthanc::
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
240
1075
d2be251975d1 Orthanc 1.12.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1027
diff changeset
241 $ docker run -p 4242:4242 -p 8042:8042 --rm --name orthanc-wsi jodogne/orthanc-plugins:1.12.4
54
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
242
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
243 Note that we gave the name ``orthanc-wsi`` to this new Docker
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
244 container. Then, the Dicomizer command-line tool can be invoked as
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
245 follows::
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
246
1075
d2be251975d1 Orthanc 1.12.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1027
diff changeset
247 $ docker run -t -i --rm --link=orthanc-wsi:orthanc --entrypoint=OrthancWSIDicomizer -v /tmp/Source.tif:/tmp/Source.tif:ro jodogne/orthanc-plugins:1.12.4 --username=orthanc --password=orthanc --orthanc=http://orthanc:8042/ /tmp/Source.tif
54
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
248
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
249 This command needs a few explanations:
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
250
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
251 * ``--link=orthanc-wsi:orthanc`` links the container running the
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
252 Dicomizer, to the Docker container running Orthanc that we started
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
253 just before.
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
254 * ``--entrypoint=OrthancWSIDicomizer`` specifies that the Dicomizer
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
255 must be run instead of the Orthanc server.
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
256 * ``-v /tmp/Source.tif:/tmp/Source.tif:ro`` maps the source image
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
257 ``/tmp/Source.tif`` on the host computer into the Orthanc container
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
258 as read-only file ``/tmp/Source.tif``.
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
259 * ``--orthanc=http://orthanc:8042/`` instructs the Dicomizer to push
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
260 images through the ``--link`` created above.
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
261 * ``--username=orthanc --password=orthanc`` correspond to the default
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
262 credentials of the ``orthanc-plugins`` image.
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
263
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
264 Obviously, you are free to add all the options you wish (check out the
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
265 ``--help`` flag to list these options). In particular, the
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
266 ``--dataset`` option allows to specify DICOM tags, in the JSON file
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
267 format, so as to include them in the resulting DICOM series (the
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
268 option ``--sample-dataset`` prints a sample JSON file that has the
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
269 expected format).
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
270
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
271 If you have a source image that is not a hierarchical TIFF, you must
358
011b01ccf52d fixing external hyperlinks
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 336
diff changeset
272 instruct the Dicomizer to use `OpenSlide <https://openslide.org/>`__
011b01ccf52d fixing external hyperlinks
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 336
diff changeset
273 to decode it by adding the ``--openslide`` option::
54
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
274
1075
d2be251975d1 Orthanc 1.12.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1027
diff changeset
275 $ docker run -t -i --rm --link=orthanc-wsi:orthanc --entrypoint=OrthancWSIDicomizer -v /tmp/Source.svs:/tmp/Source.svs:ro jodogne/orthanc-plugins:1.12.4 --username=orthanc --password=orthanc --orthanc=http://orthanc:8042/ --openslide=libopenslide.so /tmp/Source.svs
54
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
276
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
277
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
278 PostgreSQL and Orthanc inside Docker
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
279 ------------------------------------
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
280
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
281 It is possible to run both Orthanc and PostgreSQL inside Docker. First, start the official PostgreSQL container::
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
282
363
9c28eeab2db6 removed sudo from docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 358
diff changeset
283 $ docker run --name some-postgres -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=pgpassword --rm postgres
54
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
284
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
285 Open another shell, and create a database to host the Orthanc database::
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
286
363
9c28eeab2db6 removed sudo from docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 358
diff changeset
287 $ docker run -it --link some-postgres:postgres --rm postgres sh -c 'echo "CREATE DATABASE orthanc;" | exec psql -h "$POSTGRES_PORT_5432_TCP_ADDR" -p "$POSTGRES_PORT_5432_TCP_PORT" -U postgres'
54
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
288
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
289 You will have to type the password (cf. the environment variable
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
290 ``POSTGRES_PASSWORD`` above that it set to ``pgpassword``). Then,
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
291 retrieve the IP and the port of the PostgreSQL container, together
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
292 with the default Orthanc configuration file::
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
293
363
9c28eeab2db6 removed sudo from docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 358
diff changeset
294 $ docker inspect --format '{{ .NetworkSettings.IPAddress }}' some-postgres
9c28eeab2db6 removed sudo from docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 358
diff changeset
295 $ docker inspect --format '{{ .NetworkSettings.Ports }}' some-postgres
1075
d2be251975d1 Orthanc 1.12.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1027
diff changeset
296 $ docker run --rm --entrypoint=cat jodogne/orthanc-plugins:1.12.4 /etc/orthanc/orthanc.json > /tmp/orthanc.json
54
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
297
673
767c2550fa00 environment variable in docker compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 638
diff changeset
298 .. highlight:: text
54
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
299
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
300 Add the following section to ``/tmp/orthanc.json`` (adapting the
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
301 values Host and Port to what docker inspect said above)::
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
302
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
303 "PostgreSQL" : {
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
304 "EnableIndex" : true,
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
305 "EnableStorage" : true,
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
306 "Host" : "172.17.0.38",
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
307 "Port" : 5432,
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
308 "Database" : "orthanc",
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
309 "Username" : "postgres",
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
310 "Password" : "pgpassword"
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
311 }
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
312
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
313 .. highlight:: bash
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
314
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
315 Finally, you can start Orthanc::
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
316
1075
d2be251975d1 Orthanc 1.12.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1027
diff changeset
317 $ docker run -p 4242:4242 -p 8042:8042 --rm -v /tmp/orthanc.json:/etc/orthanc/orthanc.json:ro jodogne/orthanc-plugins:1.12.4
54
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
318
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
319
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
320 Debugging
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
321 ---------
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
322
176
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 175
diff changeset
323 .. highlight:: text
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 175
diff changeset
324
54
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
325 For debugging purpose, you can start an interactive bash session as
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
326 follows::
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
327
1075
d2be251975d1 Orthanc 1.12.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1027
diff changeset
328 $ docker run -i -t --rm --entrypoint=bash jodogne/orthanc:1.12.4
d2be251975d1 Orthanc 1.12.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1027
diff changeset
329 $ docker run -i -t --rm --entrypoint=bash jodogne/orthanc-plugins:1.12.4