Skip to content

Phase 2: Create and Run the sedex Client Docker Container

We refer to Phase 2 as the normal usage of the sedex Client Docker container. The steps below show how to create and run the sedex Client as a Docker container in this phase.

Phase 2: Run the container

Important: Phase 1, Initial Configuration must be completed

Before starting Phase 2, you must have completed Phase 1, Initial Configuration.

The sedex Client Docker container can only be created and started for normal use if the initialized permanent datastores ("sedex-interface" and "sedex-data") exist. See Phase 1: Initial Configuration for details.

Create and start the sedex Client Docker container

Create and run a sedex Client Docker container using the docker run command as follows:

docker run = docker create + docker start

The docker run Docker command creates and starts a new Docker container. The run command combines the docker create and docker start commands.

One can use either the separate commands or the combined docker run.

Run the sedex Client container using environment-specific values for the following options:

  • --name - An arbitrary name to identify the sedex Client Docker container. If you run only one sedex Client it could be "sedex-client"; if you run multiple sedex Clients, it is recommended to add a differentiator like the sedex ID to the name, e.g. "sedex-client-1-1234-1".
  • /path/to/sedex-interface - The path to the host's "sedex-interface" directory (containing persisted data).
  • /path/to/sedex-data - The path to the host's "sedex-data" directory (containing persisted data).
  • YOUR_MONITORING_PORT - The port at which the monitoring Web page of the sedex Client should be accessible from outside the container.
  • YOUR_WS_PROXY_HTTP_PORT - The unsecured HTTP port at which the sedex Client's Webservice Proxy should be accessible from outside the container. Note: You can omit this line if the WS-Proxy will not be used or will only be used via HTTPS.
  • YOUR_WS_PROXY_HTTPS_PORT - The secured HTTPS port at which the sedex Client's Webservice Proxy should be accessible from outside the container. Note: You can omit this line if the WS-Proxy will not be used.
  • --stop-timeout 65 - When the Docker container is stopped (e.g. with the docker stop command), the sedex Client's controller-stop.sh is executed to initiate a graceful shutdown of the client. This typically takes longer than the default 10 seconds that the Docker daemon waits before killing a container. The --stop-timeout option overrides the default. The required time will vary from one installation to another.
  • --restart unless-stopped - Restart Policy: Unless the container was stopped intentionally, this causes the container to be automatically restarted when the Docker daemon restarts.
  • --read-only- Security feature: Mounts the container's root filesystem as read-only. This makes the container immutable.
  • -d - Detached: Start the container in the background without showing log output on console.

To run the most current sedex Client container enter the following commands:

$ docker pull sedexch/sedex-client:container-1.1

$ docker run \
  --name sedex-client \
  --mount type=bind,source=/path/to/sedex-interface,destination=/sedex-interface/ \
  --mount type=bind,source=/path/to/sedex-data,destination=/sedex-data/ \
  --publish YOUR_MONITORING_PORT:8000 \
  --publish YOUR_WS_PROXY_HTTP_PORT:8080 \
  --publish YOUR_WS_PROXY_HTTPS_PORT:8443 \
  --stop-timeout 65 \
  --restart unless-stopped \
  --read-only \
  -d \
  sedexch/sedex-client:container-1.1
$ docker pull sedexch/sedex-client:container-1.1

$ docker run \
  --name sedex-client-1-1234-1 \
  --mount type=bind,source=/home/data/sedex-interface-1-1234-1,destination=/sedex-interface/ \
  --mount type=bind,source=/home/data/sedex-data-1-1234-1,destination=/sedex-data/ \
  --publish 12010:8000 \
  --publish 12020:8080 \
  --publish 12021:8443 \
  --stop-timeout 65 \
  --restart unless-stopped \
  --read-only \
  -d \
  sedexch/sedex-client:container-1.1

Info: No tag latest - use a specific tag of the container image

The instructions show how to start the container image called container-1.1 which ist the latest version 1.0.x. See Configuration Options - Advanced Configuration for details about choosing a different tag.

Info: Default sedex Client configuration

  • With the first start of the sedex Client container in phase 2, a general default configuration is created. This configuration is in the central configuration file of the sedex Client which is stored in the permanent storage (sedex-data/conf/sedex Client-configuration.properties).
  • If no such configuration file was created by the first start of the sedex Client, you can search for the cause in the Docker log file:
    $ docker logs sedex-client
    
  • If specific configuration options are required, these can either be set in the central configuration file or as environment variables of the container. For details see section Configuration Options - How to Configure.

Exemplary run of the commands

After you successfully executed the docker pull command specified above, you will see output that looks something like the following, which basically summarizes that the latest image of DockerHub could be downloaded:

user@ubuntu:~$ docker pull sedexch/sedex-client:container-1.1
latest: Pulling from sedexch/sedex-client
5843afab3874: Already exists 
8ad21265f689: Pull complete 
2e2eedfb8a20: Pull complete 
758917ddf915: Pull complete 
cec77cd3ca0e: Pull complete 
851831761fc3: Pull complete 
6e67829da275: Pull complete 
8b4ce7ee2e79: Pull complete 
3054efc41fea: Pull complete 
8e5f19c592ab: Pull complete 
f4033818fedc: Pull complete 
d2beedbac7c4: Pull complete 
50c17722356b: Pull complete 
e24d112671fd: Pull complete 
Digest: sha256:1bf69975acaa4fcea3c194e8390e823905c8fd77a172a514291b9f71d4d93fd6
Status: Downloaded newer image for sedexch/sedex-client:container-1.1

After you successfully executed the docker run command specified above, you will see an output that looks something like the following, outputting the random ID of the newly created sedex Client container:

user@ubuntu:~$ docker run \
>       --name sedex-client-1-1234-1 \
>       --mount type=bind,source=/home/data/sedex-interface-1-1234-1,destination=/sedex-interface/ \
>       --mount type=bind,source=/home/data/sedex-data-1-1234-1,destination=/sedex-data/ \
>       --publish 12010:8000 \
>       --publish 12020:8080 \
>       --publish 12021:8443 \
>       --stop-timeout 65 \
>       --restart unless-stopped \
>       --read-only \
>       -d \
>       sedexch/sedex-client:container-1.1
fde6465bc597e48bc07e7e5c41a8d49c4c4171071a58f78091f89f0ee4b3ab97