-
Notifications
You must be signed in to change notification settings - Fork 12
Docker image of Wilma
Two repository exist at Docker Hub:
-
epam/wilma - This image contains basic setup, and runs Wilma with its default settings.
-
epam/wilma-with-message-search - This image contains basic setup of both Wilma and Wilma Message Search applications, and runs both of them with their default settings.
The docker images are based on Debian, using OpenJdk 17, default ports, and nothing extra.
Note: To start both applications, the recommended host memory size is >=4G.
Use the following command to get Wilma only:
docker pull epam/wilma
Use the following command to get Wilma together with Wilma Message Search application:
docker pull epam/wilma-with-message-search
After you pulled it from Docker Hub, run the image:
docker run -t epam/wilma
After displaying the network details of the running image, Wilma will be started.
The default UI port is 1234 (so the UI is available: http://ip-of-the-running-docker-image:1234/index
), the default proxy port is 9092.
After you pulled it from Docker Hub, run the image:
docker run -t epam/wilma-with-message-search
After displaying the network details of the running image, first Wilma Message Search will be started, and after 10 seconds, Wilma will be started too.
The default UI port of Wilma is 1234 (so the UI is available: http://ip-of-the-running-docker-image:1234/index
), the default proxy port is 9092.
The default UI port of Wilma Message Search is 9093 (so the UI is available: http://ip-of-the-running-docker-image:9093/
).
Wilma is installed in /data/wilma/
, Wilma Message Search is installed in /data/wilma-ms/
folder. Based in this, you may access any file you are interested in. For example, to have access to Wilma application log that is located at /data/wilma/log/app
folder, just add -v /data/wilma/log/app
to the docker command, and you will see the file at /var/lib/docker/volumes/<latest-volume>/_data
folder of the host.
Note: Using -v folder-on-your-host:/data/wilma/log/app
is even better to get access to the log - that will be available within the folder-on-your-host
.
Note2: Using an alternative approach wget <wilma-container-ip>:1234/config/public/logs/wilmalog.txt?source=true
you may get the log file too.
Sometimes it is necessary to provide access from the host to the container, for example when you would like to use (and keep) your own configuration files, or preserve the messages.
You may do this by using the following docker parameter: -v /path/on/your/host/folder:/data/w
that means the container will see your host folder at /data/w
path.
The following Wilma external environment (ENV) variables can be specified by using -e
parameters with docker:
Name | Default value | Example Use
---------------------------------------------------------------------------------------
WILMA_CONFIGURATION | wilma.conf.properties | -e WILMA_CONFIGURATION=/data/configuration/external.conf.properties -v /path/to/your/configuration/file/on/host:/data/configuration
WILMA_MX_SIZE | <not set> | -e WILMA_MX_SIZE=-Xmx8G
WILMA_KEYSTORE | <not set> | -e WILMA_KEYSTORE=-Djavax.net.ssl.keyStore=/data/certificate/your.jks -v /path/to/your/keystore/file/on/host:/data/certificate
WILMA_KEYSTORE_PASSWORD | <not set> | -e WILMA_KEYSTORE_PASSWORD=-Djavax.net.ssl.keyStorePassword=password_for_your_jks
WILMA_JMX_PORT | <not set> | -e WILMA_JMX_PORT=9011 --publish 9011 -p 9011:9011
The following Wilma Message Search external environment (ENV) variables can be specified by using -e
parameters with docker:
Name | Default value | Example Use
---------------------------------------------------------------------------------------
WILMA_MS_CONFIGURATION | message.search.conf.properties | -e WILMA_MS_CONFIGURATION=/data/configuration/external.ms.conf.properties -v /path/to/your/configuration/file:/data/configuration
WILMA_MS_MX_SIZE | <not set> | -e WILMA_MS_MX_SIZE=-Xmx8G
WILMA_MS_JMX_PORT | <not set> | -e WILMA_MS_JMX_PORT=9010 -p 9010
When you start the container, Wilma instance is available by using the container's own IP by default. In case you would like to reach Wilma by using the IP of the Host, you need to add further parameters to the run
command:
docker run --publish 1234 --publish 9092 -p 1234:1234 -p 9092:9092 -t epam/wilma
So with --publish
and with -p
parameters it is possible to make these main ports available from the host. By using this approach, from anywhere on the network that can reach the Host can use the Wilma instance within the docker container too. Additional ports can be published too by using the same approach (like JMX port).
Let say you have this folder in your Host where you would like to put the wilma.conf.properties
and the templates and so on: ~/test-data/wilma-conf
, and Wilma should see this folder as /data/configuration
within the container. Do the followings:
- put your
wilma.conf.properties
file into~/test-data/wilma-conf
- put your
stubConfig.json
into~/test-data/wilma-conf
- create the following folders within
~/test-data/wilma-conf
:
config/condition-checkers
config/formatters
config/interceptors
config/jar
config/sequence-handlers
config/templates
- put your template files into
~/test-data/wilma-conf/config/templates
- edit your
wilma.conf.properties
and set the followings:
log.folder=/data/configuration/messages
stub.descriptors.path=/data/configuration
stub.descriptors.cache.path=/data/configuration/config/cache/stub_descriptors
stub.template.path=/data/configuration/config/templates
stub.condition.checker.path=/data/configuration/config/condition-checkers
stub.template.formatter.path=/data/configuration/config/formatters
stub.interceptor.path=/data/configuration/config/interceptors
stub.jar.path=/data/configuration/config/jar
stub.sequence.handler.path=/data/configuration/config/sequence-handlers
- check that Wilma is not running -> use
docker ps
command, and if there is any running Wilma container, kill it withdocker kill <ContainerId>
command - start Wilma container:
docker run --publish 1234 --publish 9092 -p 1234:1234 -p 9092:9092 -e WILMA_CONFIGURATION=/data/configuration/wilma.conf.properties -v ~/test-data/wilma-conf:/data/configuration
-t epam/wilma
With this setting, you will reach Wilma UI from on both inside the Host by using http://<Container-IP>:1234/index
and from outside of the Host by using http://<Host-IP>:1234/index
URLs.
The same way, the proxy port of Wilma will be available by using <Container-IP>:9092
within the Host, and/or by using <Host-IP>:9092
from outside of the Host.
The messages will be available in your ~/test-data/wilma-conf/messages
folder.
The Dockerfile
and the start scripts can be found at config/docker
folder in source repository. So for example, you can recreate the Wilma image by using the following commands:
cd config/docker
docker build -t <your-own-repo-name> -f Dockerfile-Wilma .
Also, you may create you own setup based on the offered images.
Here some further information is stored for those who maintain the docker images of Wilma.
Note: Before building the docker image, always ensure that "start_wilma.sh" and "start_wilma_and_message_search.sh" has proper Unix format. In case you edit those files in Windows, the file format might be bad, so ensure their Unix format. Example on how to ensure it on Windows: With Notepad++, correct the specific file using the option - Edit -> EOL conversion -> Unix/OSX format.
# build docker images
docker build -t epam/wilma -f Dockerfile-Wilma .
docker build -t epam/wilma-with-message-search -f Dockerfile-Wilma_and_Wilma_Message_Search .
#list available docker images
docker images
#remove a specific image
docker rmi -f <$imageID>
# tag images with specific version
docker tag <$imageID> epam/wilma:<version>
# see what is running
docker ps
# kill a running container
docker kill <$imageID>