Setting up Domino in a container environment

When starting a Domino server in a container with a new volume, the first container run deploys a new data directory containing all templates and a default NOTES.INI file. The resulting data directory is very similar to a data directory after a server install.

When updating to a new Domino version, the container image also takes care of updating the data directory in the existing volume assigned to the container automatically.

The container image supports the following configuration options.

Remote server setup listening on port 1352

If the server is not yet configured and no configuration is provided, the Domino server inside the container defaults to remote setup mode with the -listen 1352 option.

Using the NRPC port 1352 for setup avoids recreating the server after setup without the port and does not require an additional port exposed on the host machine. Do the following steps:
  • Connect with the "remote server setup" program included as an optional component of the Domino Adminstrator client.
  • Instead of the default port 8585, specify port 1352 to connect to the server to perform a remote setup.
  • When remote setup is completed and the listener is stopped, the Domino server will be automatically started.

Example:

docker run -d --name domino -v notesdata:/local/notesdata --hostname domino.acme.com --cap-add=SYS_PTRACE --stop-timeout=120 -p 80:80 -p 1352:1352 domino-container:latest

For more information, see Using the Domino server setup program remotely.

One-touch Domino setup support

The container image includes a standard Domino server with full one-touch setup support. A simple setup with basic configuration is based on environment variables or on the JSON file setup.

One-touch Domino setup using environment variables

The environment variable setup is especially designed to simplify the setup of container environments. Environment variables can be added inline in the docker run statement, or passed by means of an environment file using the --env-file option.

For more information about the one-touch environment variable configuration, see Preparing input parameters through system environment variables.

Example:

docker run -it -d \
-e SetupAutoConfigure=1 \
-e SERVERSETUP_SERVER_TYPE=first \
-e SERVERSETUP_ADMIN_FIRSTNAME=John \
-e SERVERSETUP_ADMIN_LASTNAME=Doe \
-e SERVERSETUP_ADMIN_PASSWORD=domino4ever \
-e SERVERSETUP_ADMIN_IDFILEPATH=admin.id \
-e SERVERSETUP_ORG_CERTIFIERPASSWORD=domino4ever \
-e SERVERSETUP_SERVER_DOMAINNAME=DominoDemo \
-e SERVERSETUP_ORG_ORGNAME=Domino-Demo \
-e SERVERSETUP_SERVER_NAME=domino-demo-v12 \
-e SERVERSETUP_NETWORK_HOSTNAME=domino.acme.com \
-h domino.acme.com \
-p 80:80 \
-p 1352:1352 \
-v notesdata:/local/notesdata \
--cap-add=SYS_PTRACE \
--cap-add=NET_BIND_SERVICE \
--stop-timeout=60 \
--name domino \
domino-container:latest

One-touch Domino setup using a JSON file

Domino 12 and later also supports an enhanced JSON file based setup, with additional configuration options including creating an ID Vault, creating databases from templates, and add-in updating documents.

The JSON file is specified in the environment variable SetupAutoConfigureParams. The file usually points to a file mounted into the container as shown in the following example:

docker run -it \
-e SetupAutoConfigure=1 \
-e SetupAutoConfigureParams=/etc/domino_auto_config.json \
-h domino.acme.com \
-p 80:80 \
-p 1352:1352 \
-v dominodata_demo:/local/notesdata \
-v /local/domino_auto_config.json:/etc/domino_auto_config.json \
--cap-add=SYS_PTRACE \
--cap-add=NET_BIND_SERVICE \
--stop-timeout=60 \
--name domino \
domino-container:latest
Note: If you use selinux, it is best to add the z or Z options to modify the selinux label of the host file or directory being mounted into the container. When selinux is enabled and you do not add the Z suffix to the volume mount when using the One-touch Domino setup JSON file, Domino will not have permissions to use the file for setup. Adding the Z suffix allows setup to complete successfully in this case. For example, use the following commands:
-v notesdata:/local/notesdata:Z \
-v /local/domino_auto_config.json:/etc/domino_auto_config.json:Z \

For more information, see Preparing input parameters in a JSON file.