Installing Additional Plugins in a Docker Container

To install additional product plugins on your Docker container instance there are three options:

  1. Use the file persistence and install the plugins using the built-in Plugin Store
  2. Create a customized Docker container
  3. Install the plugins on-the-fly when booting up the docker container

The first point only requires the mounting of the user directory of the product into the host system. Plugins are then persisted through container restarts.

For points two and three you an make use of the install-plugin command in the container:

You can use the command without the product and version parameters. In that case the command will derive the information from the environment. In addition you may use the parameter -d for additional debug information.

install-plugin -d authentication.twofactor

Now you can use the command in a Dockerfile to prepare your container accordingly.

Installing plugins during startup on-the-fly

Depending on your provisioning scenario you have to modify the startup command of the server. The following example displays the usage of a docker-compose.yml. Please note that you should check for the original startup line of your current container.

version: '2.1'
services:
    service:
        command: >
            sh -c "
                install-plugin -s cosmosdb &&
                install-plugin.sh -s dynamodb &&
                install-plugin.sh -d authentication.twofactor &&
                ./startServer.sh -Dclearreports.config=User/Default -Dsetupautoexecution=true
            "

The first two commands install the CosmosDB and DynamoDB persistences respectively. Note that there’re predefined containers available for that already. The third install-plugin command makes the authentication.twofactor plugin available.

As mentioned above, the last line ./startServer.sh ... actually starts the server.