Create the Contract Manager container

To create the Contract Manager container, run the following command:

docker run -d <network-parameters> <image-name> <entry-point-parameters>

Use the network-parameters to ensure that the Contract Manager is externally reachable through its public port, and that the Contract Manager and the instances can internally connect to each other, without using public connections. The network-parameters can be configured in different ways within the customer infrastructure. See the following examples of network-parameters configuration:

  • Add -p <n>:443. This parameter forwards connections to port n on the Docker host through port 443 of the Contract Manager container.

  • Add -p <n>:444. This parameter forwards connections to port n on the Docker host through port 444 of the Contract Manager container that provides access to KCM Control Center (if installed on that container at that port).

  • Add --network <name>. This parameter adds the Contract Manager container to the Docker network name.

  • Add -ip <address>. This parameter assigns address as the internal IP address of the container in the Docker network.

The entry-point-parameters are the parameters that are passed to StartContractManager.exe entry point process. These parameters are passed after the parameters that were fixed in the image (see the previous step). See the section describing StartContractManager.exe paramerters for more information.

Entry point parameters must be placed at the end of the command, after the image name. If a parameter references a file, then this file should be accessible from the container when it is started. For example, add a bind mount or volume to the Docker run command and place the file on it.

The entry point parameters can alternatively be specified as environment variables, using --env parameters on the Docker run command. It is an error if a parameter is specified both as a normal argument and as environment variable.

It is an error if a parameter of the entry point process is both given an embedded value on the image and a variable value on creating the container.

The entry point will be executed as soon as the container starts. It logs its output to the standard Docker log, which is visible with the command docker container logs <container-name>. If an error occurs in the entry point process, the created container is erroneous and should be removed. The Docker run command should be run again to create the container anew.

Example command:

docker run -d -p 443:443 -p444:444 --network nat --name cm --ip 123.45.67.89 <contract manager image name>