Set License Key for Java RESTful Engine in Docker Container
There are three ways you can pass the license key to the Java RESTful Engine on the container:
Set the license environment variable when starting the container
- You can set the license environment variable when starting the container. This is the recommended way to pass the license. This is done by adding the following to the
docker run
command:-e license={YOUR_LICENSE_KEY}
- For example, the following command will start the container with the license key set:
docker run -d -p 8080:8080 -e license={YOUR_LICENSE_KEY} --name FluentRESTfulEngine public.ecr.aws/apryse/fluent-restful:{VERSION}
- You can set the license environment variable when starting the container. This is the recommended way to pass the license. This is done by adding the following to the
Passing the license key as a header with your requests
- You can use the header
X-WINDWARD-LICENSE
to pass the license with your POST requests
- You can use the header
Setting the license in the config using Vim (not recomended, set environment variable when launching the container instead of modifying the running container). This requires a few more steps, but you don't have to worry about including the license in the header:
Install Vim:
- In the command line for the container, run
apt-get update
apt-get install vimEdit the WindwardReports.properties file using Vim
- Locate the WindwardReports.properties file on the container by running the following command:
cd /usr/local/tomcat/webapps/ROOT/WEB-INF/classes
- In there you will find the properties file. To edit it, run:
vim WindwardReports.properties
- This should open the properties file in Vim:
- To enter "Insert" mode in Vim, click
i
:
Navigate to the license using the arrow keys, and delete the "[[LICENSE]]", and replace it with your own license.
Once you have set your license, press the escape key, then
:x
to save and quit Vim.Lastly, restart your container by stopping it and starting it again. You now have setup your license key in the properties file.
3. Now just restart the container using the restart button in Docker Container:

And now youre done! Your container should be running with the license key loaded in!
NOTE: In newer versions of Docker Desktop you can edit the file directly in the UI:
