annotate Sphinx/source/users/docker.rst @ 572:b78e8bf4d021

opensuse
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sat, 26 Dec 2020 10:59:40 +0100
parents 090cc988c35e
children eaa6cdfa7ba6
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
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 Orthanc for Docker
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 ==================
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
4f076a3b9934 unanswered-forum.rst
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 461
diff changeset
11 docker-osimis.rst
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
229
c74f044dc3ce note about docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 220
diff changeset
27 **Note about Orthanc vs. Osimis Docker images:**
c74f044dc3ce note about docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 220
diff changeset
28
c74f044dc3ce note about docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 220
diff changeset
29 * The ``jodogne/orthanc`` and ``jodogne/orthanc-plugins`` Docker
c74f044dc3ce note about docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 220
diff changeset
30 images that are described on this page are always kept in sync with
c74f044dc3ce note about docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 220
diff changeset
31 the latest releases of the Orthanc project, with a basic
c74f044dc3ce note about docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 220
diff changeset
32 configuration system that is inherited from the Debian packages
c74f044dc3ce note about docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 220
diff changeset
33 (i.e. manual edition of the configuration files).
c74f044dc3ce note about docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 220
diff changeset
34
358
011b01ccf52d fixing external hyperlinks
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 336
diff changeset
35 * Our commercial partner `Osimis <https://www.osimis.io>`__ also
011b01ccf52d fixing external hyperlinks
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 336
diff changeset
36 `publishes separated Docker images
393
43c5a1274740 doc for osimis/orthanc images
Alain Mazy <alain@mazy.be>
parents: 386
diff changeset
37 <https://hub.docker.com/repository/docker/osimis/orthanc>`__.
229
c74f044dc3ce note about docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 220
diff changeset
38 These ``osimis/orthanc`` images are used by the technical team of
c74f044dc3ce note about docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 220
diff changeset
39 Osimis in order to provide professional support to their customers,
c74f044dc3ce note about docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 220
diff changeset
40 with a configuration system that can be tuned through environment
c74f044dc3ce note about docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 220
diff changeset
41 variables (which is very handy if using ``docker-compose``). These
c74f044dc3ce note about docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 220
diff changeset
42 images are not necessarily always in sync with the Orthanc project,
c74f044dc3ce note about docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 220
diff changeset
43 but they also include the :ref:`plugins edited by Osimis
c74f044dc3ce note about docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 220
diff changeset
44 <plugins-osimis>`, notably the Osimis Web viewer (that is much more
c74f044dc3ce note about docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 220
diff changeset
45 advanced than the Orthanc Web viewer) and the advanced authorization
396
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 394
diff changeset
46 plugin. A :ref:`specific page <docker-osimis>` is available to describe
393
43c5a1274740 doc for osimis/orthanc images
Alain Mazy <alain@mazy.be>
parents: 386
diff changeset
47 how these images should be used.
229
c74f044dc3ce note about docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 220
diff changeset
48
c74f044dc3ce note about docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 220
diff changeset
49 **Note for CentOS users:** The Docker environment might be difficult to
54
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50 configure on your platform. Hints are available on the `Orthanc Users
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 discussion group
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 <https://groups.google.com/d/msg/orthanc-users/w-uPAknnRQc/-XhzBGSCAwAJ>`__.
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 Running the Orthanc core
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56 ------------------------
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 The following command will start the core of Orthanc, with all the
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59 plugins disabled::
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60
363
9c28eeab2db6 removed sudo from docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 358
diff changeset
61 $ docker run -p 4242:4242 -p 8042:8042 --rm jodogne/orthanc
54
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63 Once Orthanc is running, use Mozilla Firefox at URL
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64 http://localhost:8042/ to interact with Orthanc. The default username
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65 is ``orthanc`` and its password is ``orthanc``.
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67 The command above starts the mainline version of Orthanc, whose
69
03d35f985f26 update docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 54
diff changeset
68 development is in continuous progress. Do not forget to regularly
03d35f985f26 update docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 54
diff changeset
69 update the Docker image to benefit from the latest features::
03d35f985f26 update docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 54
diff changeset
70
363
9c28eeab2db6 removed sudo from docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 358
diff changeset
71 $ docker pull jodogne/orthanc
69
03d35f985f26 update docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 54
diff changeset
72
03d35f985f26 update docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 54
diff changeset
73 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
74 Orthanc to be run::
54
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
75
568
090cc988c35e Orthanc 1.8.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 554
diff changeset
76 $ docker run -p 4242:4242 -p 8042:8042 --rm jodogne/orthanc:1.8.2
54
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 Passing additional command-line options (e.g. to make Orthanc verbose)
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
79 can be done as follows (note the ``/etc/orthanc`` option that is
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
80 required for Orthanc to find its configuration files)::
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
81
363
9c28eeab2db6 removed sudo from docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 358
diff changeset
82 $ docker run -p 4242:4242 -p 8042:8042 --rm jodogne/orthanc /etc/orthanc --verbose
54
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
83
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
84
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
85 Usage, with plugins enabled
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
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
88 The following command will run the mainline version of the Orthanc
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
89 core, together with its :ref:`Web viewer <webviewer>`, its
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
90 :ref:`PostgreSQL support <postgresql>`, its :ref:`DICOMweb
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
91 implementation <dicomweb>`, and its :ref:`whole-slide imaging viewer
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
92 <wsi>`::
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
93
363
9c28eeab2db6 removed sudo from docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 358
diff changeset
94 $ 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
95
365
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 364
diff changeset
96 Or you can also start a specific version of Orthanc for more stability::
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 364
diff changeset
97
568
090cc988c35e Orthanc 1.8.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 554
diff changeset
98 $ docker run -p 4242:4242 -p 8042:8042 --rm jodogne/orthanc-plugins:1.8.2
365
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 364
diff changeset
99
364
234de55ed125 usage of the python plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 363
diff changeset
100 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
101 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
102 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
103 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
104
365
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 364
diff changeset
105 $ docker run -p 4242:4242 -p 8042:8042 --rm jodogne/orthanc-python
568
090cc988c35e Orthanc 1.8.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 554
diff changeset
106 $ docker run -p 4242:4242 -p 8042:8042 --rm jodogne/orthanc-python:1.8.2
364
234de55ed125 usage of the python plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 363
diff changeset
107
54
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 Fine-tuning the configuration
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 For security reasons, you should at least protect your instance of
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
113 Orthanc by changing this default user, in the ``RegisteredUsers``
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
114 :ref:`configuration option <configuration>`. You will also probably
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
115 need to fine-tune other parameters, notably the list of the DICOM
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
116 modalities Orthanc knows about.
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
117
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
118 You can generate a custom configuration file for Orthanc as follows::
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
119
363
9c28eeab2db6 removed sudo from docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 358
diff changeset
120 $ docker run --rm --entrypoint=cat jodogne/orthanc /etc/orthanc/orthanc.json > /tmp/orthanc.json
54
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
121
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
122 Then, edit the just-generated file ``/tmp/orthanc.json`` and restart
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
123 Orthanc with your updated configuration::
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
124
363
9c28eeab2db6 removed sudo from docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 358
diff changeset
125 $ docker run -p 4242:4242 -p 8042:8042 --rm -v /tmp/orthanc.json:/etc/orthanc/orthanc.json:ro jodogne/orthanc
54
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
126
384
e4b0a4d69f42 note about memory usage
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 382
diff changeset
127 *Remark:* These Docker images automatically set the environment
e4b0a4d69f42 note about memory usage
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 382
diff changeset
128 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
129 memory usage <scalability-memory>`. This default setting can be
e4b0a4d69f42 note about memory usage
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 382
diff changeset
130 overriden by providing the option ``-e MALLOC_ARENA_MAX=1`` when
386
801db4e1828c default
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 384
diff changeset
131 invoking ``docker run`` (the value ``0`` corresponds to the default
801db4e1828c default
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 384
diff changeset
132 value).
384
e4b0a4d69f42 note about memory usage
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 382
diff changeset
133
54
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
134
382
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
135 .. _docker-compose:
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
136
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
137 Configuration management using Docker Compose
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
138 ---------------------------------------------
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
139
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
140 Depending on the context, the `Docker Compose tool
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
141 <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
142 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
143 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
144 configuration files to Orthanc as `secrets
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
145 <https://docs.docker.com/compose/compose-file/#secrets>`__ (note that
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
146 the related option ``configs`` could in theory be better,
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
147 unfortunately it is only available to `Docker Swarm
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
148 <https://github.com/docker/compose/issues/5110>`__).
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
149
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
150 .. highlight:: yml
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
151
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
152 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
153 the `YAML file format <https://en.wikipedia.org/wiki/YAML>`__)::
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
154
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
155 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
156 services:
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
157 orthanc:
568
090cc988c35e Orthanc 1.8.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 554
diff changeset
158 image: jodogne/orthanc-plugins:1.8.2
382
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
159 command: /run/secrets/ # Path to the configuration files (stored as secrets)
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
160 ports:
402
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 396
diff changeset
161 - 4242:4242
382
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
162 - 8042:8042
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
163 secrets:
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
164 - orthanc.json
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
165 secrets:
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
166 orthanc.json:
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
167 file: orthanc.json
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
168
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
169 .. highlight:: json
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
170
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
171 Then, place the configuration file ``orthanc.json`` next to the
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
172 ``docker-compose.yml`` file. Here is a minimalist ``orthanc.json``::
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
173
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
174 {
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
175 "Name" : "Orthanc in Docker",
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
176 "RemoteAccessAllowed" : true
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
177 }
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 .. highlight:: bash
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
180
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
181 This single configuration file should contain all the required
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
182 configuration options for Orthanc and all its plugins. The container
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
183 can then be started as follows::
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
184
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
185 $ docker-compose up
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
186
64b32cb19571 docker-compose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 365
diff changeset
187
54
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
188 Making the Orthanc database persistent
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
189 --------------------------------------
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
190
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
191 The filesystem of Docker containers is volatile (its content is
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
192 deleted once the container stops). You can make the Orthanc database
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
193 persistent by mapping the ``/var/lib/orthanc/db`` folder of the
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
194 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
195
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
196 $ mkdir /tmp/orthanc-db
568
090cc988c35e Orthanc 1.8.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 554
diff changeset
197 $ docker run -p 4242:4242 -p 8042:8042 --rm -v /tmp/orthanc-db/:/var/lib/orthanc/db/ jodogne/orthanc:1.8.2
54
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
198
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
199
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
200 Whole-slide imaging support
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
201 ---------------------------
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
202
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
203 The ``orthanc-plugins`` image includes support for :ref:`microscopic
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
204 whole-slide imaging (WSI) <wsi>`. For instance, the following command
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
205 will start the WSI viewer plugin transparently together with Orthanc::
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
206
363
9c28eeab2db6 removed sudo from docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 358
diff changeset
207 $ docker run -p 4242:4242 -p 8042:8042 --rm --name orthanc-wsi jodogne/orthanc-plugins
54
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
208
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
209 Note that we gave the name ``orthanc-wsi`` to this new Docker
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
210 container. Then, the Dicomizer command-line tool can be invoked as
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
211 follows::
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
212
363
9c28eeab2db6 removed sudo from docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 358
diff changeset
213 $ docker run -t -i --rm --link=orthanc-wsi:orthanc --entrypoint=OrthancWSIDicomizer -v /tmp/Source.tif:/tmp/Source.tif:ro jodogne/orthanc-plugins --username=orthanc --password=orthanc --orthanc=http://orthanc:8042/ /tmp/Source.tif
54
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
214
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
215 This command needs a few explanations:
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
216
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
217 * ``--link=orthanc-wsi:orthanc`` links the container running the
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
218 Dicomizer, to the Docker container running Orthanc that we started
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
219 just before.
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
220 * ``--entrypoint=OrthancWSIDicomizer`` specifies that the Dicomizer
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
221 must be run instead of the Orthanc server.
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
222 * ``-v /tmp/Source.tif:/tmp/Source.tif:ro`` maps the source image
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
223 ``/tmp/Source.tif`` on the host computer into the Orthanc container
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
224 as read-only file ``/tmp/Source.tif``.
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
225 * ``--orthanc=http://orthanc:8042/`` instructs the Dicomizer to push
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
226 images through the ``--link`` created above.
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
227 * ``--username=orthanc --password=orthanc`` correspond to the default
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
228 credentials of the ``orthanc-plugins`` image.
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 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
231 ``--help`` flag to list these options). In particular, the
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
232 ``--dataset`` option allows to specify DICOM tags, in the JSON file
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
233 format, so as to include them in the resulting DICOM series (the
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
234 option ``--sample-dataset`` prints a sample JSON file that has the
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
235 expected format).
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 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
238 instruct the Dicomizer to use `OpenSlide <https://openslide.org/>`__
011b01ccf52d fixing external hyperlinks
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 336
diff changeset
239 to decode it by adding the ``--openslide`` option::
54
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
240
363
9c28eeab2db6 removed sudo from docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 358
diff changeset
241 $ docker run -t -i --rm --link=orthanc-wsi:orthanc --entrypoint=OrthancWSIDicomizer -v /tmp/Source.svs:/tmp/Source.svs:ro jodogne/orthanc-plugins --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
242
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
243
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
244 PostgreSQL and Orthanc inside Docker
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
245 ------------------------------------
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
246
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
247 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
248
363
9c28eeab2db6 removed sudo from docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 358
diff changeset
249 $ 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
250
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
251 Open another shell, and create a database to host the Orthanc database::
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
252
363
9c28eeab2db6 removed sudo from docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 358
diff changeset
253 $ 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
254
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
255 You will have to type the password (cf. the environment variable
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
256 ``POSTGRES_PASSWORD`` above that it set to ``pgpassword``). Then,
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
257 retrieve the IP and the port of the PostgreSQL container, together
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
258 with the default Orthanc configuration file::
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
259
363
9c28eeab2db6 removed sudo from docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 358
diff changeset
260 $ docker inspect --format '{{ .NetworkSettings.IPAddress }}' some-postgres
9c28eeab2db6 removed sudo from docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 358
diff changeset
261 $ docker inspect --format '{{ .NetworkSettings.Ports }}' some-postgres
9c28eeab2db6 removed sudo from docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 358
diff changeset
262 $ docker run --rm --entrypoint=cat jodogne/orthanc-plugins /etc/orthanc/orthanc.json > /tmp/orthanc.json
54
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 .. highlight:: json
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
265
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
266 Add the following section to ``/tmp/orthanc.json`` (adapting the
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
267 values Host and Port to what docker inspect said above)::
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
268
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
269 "PostgreSQL" : {
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
270 "EnableIndex" : true,
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
271 "EnableStorage" : true,
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
272 "Host" : "172.17.0.38",
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
273 "Port" : 5432,
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
274 "Database" : "orthanc",
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
275 "Username" : "postgres",
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
276 "Password" : "pgpassword"
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
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
279 .. highlight:: bash
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 Finally, you can start Orthanc::
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 -p 4242:4242 -p 8042:8042 --rm -v /tmp/orthanc.json:/etc/orthanc/orthanc.json:ro jodogne/orthanc-plugins
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
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
286 Debugging
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
287 ---------
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
288
176
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 175
diff changeset
289 .. highlight:: text
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 175
diff changeset
290
54
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
291 For debugging purpose, you can start an interactive bash session as
bd0fbf1f0143 docker documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
292 follows::
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 run -i -t --rm --entrypoint=bash jodogne/orthanc
9c28eeab2db6 removed sudo from docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 358
diff changeset
295 $ docker run -i -t --rm --entrypoint=bash jodogne/orthanc-plugins
175
2c87e18ace33 gdb and docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
296
176
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 175
diff changeset
297 For developers and power users, the images ``jodogne/orthanc-debug``
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 175
diff changeset
298 contain the Orthanc core compiled in debug mode (i.e. with runtime
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 175
diff changeset
299 assertions enabled, and including debugging symbols). A ``gdb``
177
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 176
diff changeset
300 command-line session can be started as follows::
176
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 175
diff changeset
301
363
9c28eeab2db6 removed sudo from docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 358
diff changeset
302 $ docker run -i -t --rm --entrypoint=bash --network=host --cap-add=SYS_PTRACE -p 4242:4242 -p 8042:8042 jodogne/orthanc-debug
176
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 175
diff changeset
303 # gdb --args Orthanc /etc/orthanc/ --verbose
175
2c87e18ace33 gdb and docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
304
184
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 183
diff changeset
305 Exceptions can be automatically caught by launching ``gdb`` as follows::
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 183
diff changeset
306
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 183
diff changeset
307 # gdb --ex 'catch t' --ex r --ex bt --args ./Orthanc /etc/orthanc/ --verbose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 183
diff changeset
308
176
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 175
diff changeset
309 Note that:
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 175
diff changeset
310
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 175
diff changeset
311 * The plugins are not available in this image yet.
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 175
diff changeset
312
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 175
diff changeset
313 * The Orthanc source code can be found in folder ``/root/orthanc``.
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 175
diff changeset
314
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 175
diff changeset
315 * The build artifacts can be found in folder ``/root/orthanc/Build``.
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 175
diff changeset
316
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 175
diff changeset
317 * This command launches the mainline version. To start a released version,
568
090cc988c35e Orthanc 1.8.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 554
diff changeset
318 use e.g. ``jodogne/orthanc-debug:1.8.2``.