changeset 363:9c28eeab2db6

removed sudo from docker
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 31 Mar 2020 17:27:55 +0200
parents 022d59428ea3
children 234de55ed125
files Sphinx/source/users/advanced-rest.rst Sphinx/source/users/docker.rst
diffstat 2 files changed, 21 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/Sphinx/source/users/advanced-rest.rst	Tue Mar 31 15:13:35 2020 +0200
+++ b/Sphinx/source/users/advanced-rest.rst	Tue Mar 31 17:27:55 2020 +0200
@@ -272,4 +272,4 @@
 writing this configuration to, say, ``/tmp/prometheus.yml``, then
 type::
           
-  $ sudo docker run -p 9090:9090 -v /tmp/prometheus.yml:/etc/prometheus/prometheus.yml --rm prom/prometheus:v2.7.0
+  $ sudo run -p 9090:9090 -v /tmp/prometheus.yml:/etc/prometheus/prometheus.yml --rm prom/prometheus:v2.7.0
--- a/Sphinx/source/users/docker.rst	Tue Mar 31 15:13:35 2020 +0200
+++ b/Sphinx/source/users/docker.rst	Tue Mar 31 17:27:55 2020 +0200
@@ -51,7 +51,7 @@
 The following command will start the core of Orthanc, with all the
 plugins disabled::
 
-  $ sudo docker run -p 4242:4242 -p 8042:8042 --rm jodogne/orthanc
+  $ docker run -p 4242:4242 -p 8042:8042 --rm jodogne/orthanc
 
 Once Orthanc is running, use Mozilla Firefox at URL
 http://localhost:8042/ to interact with Orthanc. The default username
@@ -61,18 +61,18 @@
 development is in continuous progress. Do not forget to regularly
 update the Docker image to benefit from the latest features::
 
-  $ sudo docker pull jodogne/orthanc
+  $ docker pull jodogne/orthanc
 
 If more stability is required, you can select the official release of
 Orthanc to be run::
 
-  $ sudo docker run -p 4242:4242 -p 8042:8042 --rm jodogne/orthanc:1.6.0
+  $ docker run -p 4242:4242 -p 8042:8042 --rm jodogne/orthanc:1.6.0
 
 Passing additional command-line options (e.g. to make Orthanc verbose)
 can be done as follows (note the ``/etc/orthanc`` option that is
 required for Orthanc to find its configuration files)::
 
-  $ sudo docker run -p 4242:4242 -p 8042:8042 --rm jodogne/orthanc /etc/orthanc --verbose
+  $ docker run -p 4242:4242 -p 8042:8042 --rm jodogne/orthanc /etc/orthanc --verbose
 
 
 Usage, with plugins enabled
@@ -84,7 +84,7 @@
 implementation <dicomweb>`, and its :ref:`whole-slide imaging viewer
 <wsi>`::
 
-  $ sudo docker run -p 4242:4242 -p 8042:8042 --rm jodogne/orthanc-plugins
+  $ docker run -p 4242:4242 -p 8042:8042 --rm jodogne/orthanc-plugins
 
 
 Fine-tuning the configuration
@@ -98,12 +98,12 @@
 
 You can generate a custom configuration file for Orthanc as follows::
 
-  $ sudo docker run --rm --entrypoint=cat jodogne/orthanc /etc/orthanc/orthanc.json > /tmp/orthanc.json
+  $ docker run --rm --entrypoint=cat jodogne/orthanc /etc/orthanc/orthanc.json > /tmp/orthanc.json
 
 Then, edit the just-generated file ``/tmp/orthanc.json`` and restart
 Orthanc with your updated configuration::
 
-  $ sudo docker run -p 4242:4242 -p 8042:8042 --rm -v /tmp/orthanc.json:/etc/orthanc/orthanc.json:ro jodogne/orthanc
+  $ docker run -p 4242:4242 -p 8042:8042 --rm -v /tmp/orthanc.json:/etc/orthanc/orthanc.json:ro jodogne/orthanc
 
 
 Making the Orthanc database persistent
@@ -115,7 +115,7 @@
 container to some path in the filesystem of your Linux host, e.g.::
 
   $ mkdir /tmp/orthanc-db
-  $ sudo docker run -p 4242:4242 -p 8042:8042 --rm -v /tmp/orthanc-db/:/var/lib/orthanc/db/ jodogne/orthanc:1.6.0 
+  $ docker run -p 4242:4242 -p 8042:8042 --rm -v /tmp/orthanc-db/:/var/lib/orthanc/db/ jodogne/orthanc:1.6.0 
 
 
 Whole-slide imaging support
@@ -125,13 +125,13 @@
 whole-slide imaging (WSI) <wsi>`. For instance, the following command
 will start the WSI viewer plugin transparently together with Orthanc::
 
-  $ sudo docker run -p 4242:4242 -p 8042:8042 --rm --name orthanc-wsi jodogne/orthanc-plugins
+  $ docker run -p 4242:4242 -p 8042:8042 --rm --name orthanc-wsi jodogne/orthanc-plugins
 
 Note that we gave the name ``orthanc-wsi`` to this new Docker
 container. Then, the Dicomizer command-line tool can be invoked as
 follows::
 
-  $ sudo 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
+  $ 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
 
 This command needs a few explanations:
 
@@ -159,7 +159,7 @@
 instruct the Dicomizer to use `OpenSlide <https://openslide.org/>`__
 to decode it by adding the ``--openslide`` option::
 
-  $ sudo 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
+  $ 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
 
 
 PostgreSQL and Orthanc inside Docker
@@ -167,20 +167,20 @@
 
 It is possible to run both Orthanc and PostgreSQL inside Docker. First, start the official PostgreSQL container::
 
-  $ sudo docker run --name some-postgres -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=pgpassword --rm postgres
+  $ docker run --name some-postgres -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=pgpassword --rm postgres
 
 Open another shell, and create a database to host the Orthanc database::
 
-  $ sudo 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'
+  $ 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'
 
 You will have to type the password (cf. the environment variable
 ``POSTGRES_PASSWORD`` above that it set to ``pgpassword``). Then,
 retrieve the IP and the port of the PostgreSQL container, together
 with the default Orthanc configuration file::
 
-  $ sudo docker inspect --format '{{ .NetworkSettings.IPAddress }}' some-postgres
-  $ sudo docker inspect --format '{{ .NetworkSettings.Ports }}' some-postgres
-  $ sudo docker run --rm --entrypoint=cat jodogne/orthanc-plugins /etc/orthanc/orthanc.json > /tmp/orthanc.json
+  $ docker inspect --format '{{ .NetworkSettings.IPAddress }}' some-postgres
+  $ docker inspect --format '{{ .NetworkSettings.Ports }}' some-postgres
+  $ docker run --rm --entrypoint=cat jodogne/orthanc-plugins /etc/orthanc/orthanc.json > /tmp/orthanc.json
 
 .. highlight:: json
 
@@ -201,7 +201,7 @@
 
 Finally, you can start Orthanc::
 
-  $ sudo docker run -p 4242:4242 -p 8042:8042 --rm -v /tmp/orthanc.json:/etc/orthanc/orthanc.json:ro jodogne/orthanc-plugins
+  $ docker run -p 4242:4242 -p 8042:8042 --rm -v /tmp/orthanc.json:/etc/orthanc/orthanc.json:ro jodogne/orthanc-plugins
 
 
 Debugging
@@ -212,15 +212,15 @@
 For debugging purpose, you can start an interactive bash session as
 follows::
 
-  $ sudo docker run -i -t --rm --entrypoint=bash jodogne/orthanc
-  $ sudo docker run -i -t --rm --entrypoint=bash jodogne/orthanc-plugins
+  $ docker run -i -t --rm --entrypoint=bash jodogne/orthanc
+  $ docker run -i -t --rm --entrypoint=bash jodogne/orthanc-plugins
 
 For developers and power users, the images ``jodogne/orthanc-debug``
 contain the Orthanc core compiled in debug mode (i.e. with runtime
 assertions enabled, and including debugging symbols). A ``gdb``
 command-line session can be started as follows::
 
-  $ sudo docker run -i -t --rm --entrypoint=bash --network=host --cap-add=SYS_PTRACE -p 4242:4242 -p 8042:8042 jodogne/orthanc-debug
+  $ docker run -i -t --rm --entrypoint=bash --network=host --cap-add=SYS_PTRACE -p 4242:4242 -p 8042:8042 jodogne/orthanc-debug
   # gdb --args Orthanc /etc/orthanc/ --verbose
 
 Exceptions can be automatically caught by launching ``gdb`` as follows::