Mercurial > hg > orthanc-book
comparison Sphinx/source/users/docker.rst @ 866:16d41a4f5ffb
fix: jodogne/orthanc:1.11.1 are not available yet
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sat, 09 Jul 2022 12:17:26 +0200 |
parents | 3e8a3a900e9e |
children | 815f70009ec2 |
comparison
equal
deleted
inserted
replaced
865:ae2002f69694 | 866:16d41a4f5ffb |
---|---|
73 $ docker pull jodogne/orthanc | 73 $ docker pull jodogne/orthanc |
74 | 74 |
75 If more stability is required, you can select the official release of | 75 If more stability is required, you can select the official release of |
76 Orthanc to be run:: | 76 Orthanc to be run:: |
77 | 77 |
78 $ docker run -p 4242:4242 -p 8042:8042 --rm jodogne/orthanc:1.11.1 | 78 $ docker run -p 4242:4242 -p 8042:8042 --rm jodogne/orthanc:1.11.0 |
79 | 79 |
80 Passing additional command-line options (e.g. to make Orthanc verbose) | 80 Passing additional command-line options (e.g. to make Orthanc verbose) |
81 can be done as follows (note the ``/etc/orthanc`` option that is | 81 can be done as follows (note the ``/etc/orthanc`` option that is |
82 required for Orthanc to find its configuration files):: | 82 required for Orthanc to find its configuration files):: |
83 | 83 |
84 $ docker run -p 4242:4242 -p 8042:8042 --rm jodogne/orthanc /etc/orthanc --verbose | 84 $ docker run -p 4242:4242 -p 8042:8042 --rm jodogne/orthanc:1.11.0 /etc/orthanc --verbose |
85 | 85 |
86 | 86 |
87 Usage, with plugins enabled | 87 Usage, with plugins enabled |
88 --------------------------- | 88 --------------------------- |
89 | 89 |
95 | 95 |
96 $ docker run -p 4242:4242 -p 8042:8042 --rm jodogne/orthanc-plugins | 96 $ docker run -p 4242:4242 -p 8042:8042 --rm jodogne/orthanc-plugins |
97 | 97 |
98 Or you can also start a specific version of Orthanc for more stability:: | 98 Or you can also start a specific version of Orthanc for more stability:: |
99 | 99 |
100 $ docker run -p 4242:4242 -p 8042:8042 --rm jodogne/orthanc-plugins:1.11.1 | 100 $ docker run -p 4242:4242 -p 8042:8042 --rm jodogne/orthanc-plugins:1.11.0 |
101 | 101 |
102 If you have an interest in the :ref:`Python plugin <python-plugin>`, | 102 If you have an interest in the :ref:`Python plugin <python-plugin>`, |
103 you can use the ``orthanc-python`` image. The latter image is a | 103 you can use the ``orthanc-python`` image. The latter image is a |
104 heavier version of the ``orthanc-plugins`` image, as it embeds the | 104 heavier version of the ``orthanc-plugins`` image, as it embeds the |
105 Python 3.7 interpreter. Here is how to start this image:: | 105 Python 3.7 interpreter. Here is how to start this image:: |
106 | 106 |
107 $ docker run -p 4242:4242 -p 8042:8042 --rm jodogne/orthanc-python | 107 $ docker run -p 4242:4242 -p 8042:8042 --rm jodogne/orthanc-python |
108 $ docker run -p 4242:4242 -p 8042:8042 --rm jodogne/orthanc-python:1.11.1 | 108 $ docker run -p 4242:4242 -p 8042:8042 --rm jodogne/orthanc-python:1.11.0 |
109 | 109 |
110 | 110 |
111 Fine-tuning the configuration | 111 Fine-tuning the configuration |
112 ----------------------------- | 112 ----------------------------- |
113 | 113 |
117 need to fine-tune other parameters, notably the list of the DICOM | 117 need to fine-tune other parameters, notably the list of the DICOM |
118 modalities Orthanc knows about. | 118 modalities Orthanc knows about. |
119 | 119 |
120 You can generate a custom configuration file for Orthanc as follows:: | 120 You can generate a custom configuration file for Orthanc as follows:: |
121 | 121 |
122 $ docker run --rm --entrypoint=cat jodogne/orthanc /etc/orthanc/orthanc.json > /tmp/orthanc.json | 122 $ docker run --rm --entrypoint=cat jodogne/orthanc:1.11.0 /etc/orthanc/orthanc.json > /tmp/orthanc.json |
123 | 123 |
124 Then, edit the just-generated file ``/tmp/orthanc.json`` and restart | 124 Then, edit the just-generated file ``/tmp/orthanc.json`` and restart |
125 Orthanc with your updated configuration:: | 125 Orthanc with your updated configuration:: |
126 | 126 |
127 $ docker run -p 4242:4242 -p 8042:8042 --rm -v /tmp/orthanc.json:/etc/orthanc/orthanc.json:ro jodogne/orthanc | 127 $ docker run -p 4242:4242 -p 8042:8042 --rm -v /tmp/orthanc.json:/etc/orthanc/orthanc.json:ro jodogne/orthanc:1.11.0 |
128 | 128 |
129 *Remark:* These Docker images automatically set the environment | 129 *Remark:* These Docker images automatically set the environment |
130 variable ``MALLOC_ARENA_MAX`` to ``5`` in order to :ref:`control | 130 variable ``MALLOC_ARENA_MAX`` to ``5`` in order to :ref:`control |
131 memory usage <scalability-memory>`. This default setting can be | 131 memory usage <scalability-memory>`. This default setting can be |
132 overriden by providing the option ``-e MALLOC_ARENA_MAX=1`` when | 132 overriden by providing the option ``-e MALLOC_ARENA_MAX=1`` when |
155 the `YAML file format <https://en.wikipedia.org/wiki/YAML>`__):: | 155 the `YAML file format <https://en.wikipedia.org/wiki/YAML>`__):: |
156 | 156 |
157 version: '3.1' # Secrets are only available since this version of Docker Compose | 157 version: '3.1' # Secrets are only available since this version of Docker Compose |
158 services: | 158 services: |
159 orthanc: | 159 orthanc: |
160 image: jodogne/orthanc-plugins:1.11.1 | 160 image: jodogne/orthanc-plugins:1.11.0 |
161 command: /run/secrets/ # Path to the configuration files (stored as secrets) | 161 command: /run/secrets/ # Path to the configuration files (stored as secrets) |
162 ports: | 162 ports: |
163 - 4242:4242 | 163 - 4242:4242 |
164 - 8042:8042 | 164 - 8042:8042 |
165 secrets: | 165 secrets: |
204 deleted once the container stops). You can make the Orthanc database | 204 deleted once the container stops). You can make the Orthanc database |
205 persistent by mapping the ``/var/lib/orthanc/db`` folder of the | 205 persistent by mapping the ``/var/lib/orthanc/db`` folder of the |
206 container to some path in the filesystem of your Linux host, e.g.:: | 206 container to some path in the filesystem of your Linux host, e.g.:: |
207 | 207 |
208 $ mkdir /tmp/orthanc-db | 208 $ mkdir /tmp/orthanc-db |
209 $ docker run -p 4242:4242 -p 8042:8042 --rm -v /tmp/orthanc-db/:/var/lib/orthanc/db/ jodogne/orthanc:1.11.1 | 209 $ docker run -p 4242:4242 -p 8042:8042 --rm -v /tmp/orthanc-db/:/var/lib/orthanc/db/ jodogne/orthanc:1.11.0 |
210 | 210 |
211 | 211 |
212 Whole-slide imaging support | 212 Whole-slide imaging support |
213 --------------------------- | 213 --------------------------- |
214 | 214 |
215 The ``orthanc-plugins`` image includes support for :ref:`microscopic | 215 The ``orthanc-plugins`` image includes support for :ref:`microscopic |
216 whole-slide imaging (WSI) <wsi>`. For instance, the following command | 216 whole-slide imaging (WSI) <wsi>`. For instance, the following command |
217 will start the WSI viewer plugin transparently together with Orthanc:: | 217 will start the WSI viewer plugin transparently together with Orthanc:: |
218 | 218 |
219 $ docker run -p 4242:4242 -p 8042:8042 --rm --name orthanc-wsi jodogne/orthanc-plugins | 219 $ docker run -p 4242:4242 -p 8042:8042 --rm --name orthanc-wsi jodogne/orthanc-plugins:1.11.0 |
220 | 220 |
221 Note that we gave the name ``orthanc-wsi`` to this new Docker | 221 Note that we gave the name ``orthanc-wsi`` to this new Docker |
222 container. Then, the Dicomizer command-line tool can be invoked as | 222 container. Then, the Dicomizer command-line tool can be invoked as |
223 follows:: | 223 follows:: |
224 | 224 |
225 $ 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 | 225 $ docker run -t -i --rm --link=orthanc-wsi:orthanc --entrypoint=OrthancWSIDicomizer -v /tmp/Source.tif:/tmp/Source.tif:ro jodogne/orthanc-plugins:1.11.0 --username=orthanc --password=orthanc --orthanc=http://orthanc:8042/ /tmp/Source.tif |
226 | 226 |
227 This command needs a few explanations: | 227 This command needs a few explanations: |
228 | 228 |
229 * ``--link=orthanc-wsi:orthanc`` links the container running the | 229 * ``--link=orthanc-wsi:orthanc`` links the container running the |
230 Dicomizer, to the Docker container running Orthanc that we started | 230 Dicomizer, to the Docker container running Orthanc that we started |
248 | 248 |
249 If you have a source image that is not a hierarchical TIFF, you must | 249 If you have a source image that is not a hierarchical TIFF, you must |
250 instruct the Dicomizer to use `OpenSlide <https://openslide.org/>`__ | 250 instruct the Dicomizer to use `OpenSlide <https://openslide.org/>`__ |
251 to decode it by adding the ``--openslide`` option:: | 251 to decode it by adding the ``--openslide`` option:: |
252 | 252 |
253 $ 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 | 253 $ docker run -t -i --rm --link=orthanc-wsi:orthanc --entrypoint=OrthancWSIDicomizer -v /tmp/Source.svs:/tmp/Source.svs:ro jodogne/orthanc-plugins:1.11.0 --username=orthanc --password=orthanc --orthanc=http://orthanc:8042/ --openslide=libopenslide.so /tmp/Source.svs |
254 | 254 |
255 | 255 |
256 PostgreSQL and Orthanc inside Docker | 256 PostgreSQL and Orthanc inside Docker |
257 ------------------------------------ | 257 ------------------------------------ |
258 | 258 |
269 retrieve the IP and the port of the PostgreSQL container, together | 269 retrieve the IP and the port of the PostgreSQL container, together |
270 with the default Orthanc configuration file:: | 270 with the default Orthanc configuration file:: |
271 | 271 |
272 $ docker inspect --format '{{ .NetworkSettings.IPAddress }}' some-postgres | 272 $ docker inspect --format '{{ .NetworkSettings.IPAddress }}' some-postgres |
273 $ docker inspect --format '{{ .NetworkSettings.Ports }}' some-postgres | 273 $ docker inspect --format '{{ .NetworkSettings.Ports }}' some-postgres |
274 $ docker run --rm --entrypoint=cat jodogne/orthanc-plugins /etc/orthanc/orthanc.json > /tmp/orthanc.json | 274 $ docker run --rm --entrypoint=cat jodogne/orthanc-plugins:1.11.0 /etc/orthanc/orthanc.json > /tmp/orthanc.json |
275 | 275 |
276 .. highlight:: text | 276 .. highlight:: text |
277 | 277 |
278 Add the following section to ``/tmp/orthanc.json`` (adapting the | 278 Add the following section to ``/tmp/orthanc.json`` (adapting the |
279 values Host and Port to what docker inspect said above):: | 279 values Host and Port to what docker inspect said above):: |
290 | 290 |
291 .. highlight:: bash | 291 .. highlight:: bash |
292 | 292 |
293 Finally, you can start Orthanc:: | 293 Finally, you can start Orthanc:: |
294 | 294 |
295 $ docker run -p 4242:4242 -p 8042:8042 --rm -v /tmp/orthanc.json:/etc/orthanc/orthanc.json:ro jodogne/orthanc-plugins | 295 $ docker run -p 4242:4242 -p 8042:8042 --rm -v /tmp/orthanc.json:/etc/orthanc/orthanc.json:ro jodogne/orthanc-plugins:1.11.0 |
296 | 296 |
297 | 297 |
298 Debugging | 298 Debugging |
299 --------- | 299 --------- |
300 | 300 |
301 .. highlight:: text | 301 .. highlight:: text |
302 | 302 |
303 For debugging purpose, you can start an interactive bash session as | 303 For debugging purpose, you can start an interactive bash session as |
304 follows:: | 304 follows:: |
305 | 305 |
306 $ docker run -i -t --rm --entrypoint=bash jodogne/orthanc | 306 $ docker run -i -t --rm --entrypoint=bash jodogne/orthanc:1.11.0 |
307 $ docker run -i -t --rm --entrypoint=bash jodogne/orthanc-plugins | 307 $ docker run -i -t --rm --entrypoint=bash jodogne/orthanc-plugins:1.11.0 |
308 | 308 |
309 For developers and power users, the images ``jodogne/orthanc-debug`` | 309 For developers and power users, the images ``jodogne/orthanc-debug`` |
310 contain the Orthanc core compiled in debug mode (i.e. with runtime | 310 contain the Orthanc core compiled in debug mode (i.e. with runtime |
311 assertions enabled, and including debugging symbols). A ``gdb`` | 311 assertions enabled, and including debugging symbols). A ``gdb`` |
312 command-line session can be started as follows:: | 312 command-line session can be started as follows:: |
325 * The Orthanc source code can be found in folder ``/root/orthanc``. | 325 * The Orthanc source code can be found in folder ``/root/orthanc``. |
326 | 326 |
327 * The build artifacts can be found in folder ``/root/orthanc/Build``. | 327 * The build artifacts can be found in folder ``/root/orthanc/Build``. |
328 | 328 |
329 * This command launches the mainline version. To start a released version, | 329 * This command launches the mainline version. To start a released version, |
330 use e.g. ``jodogne/orthanc-debug:1.11.1``. | 330 use e.g. ``jodogne/orthanc-debug:1.11.0``. |