Create an instance container

To create an instance container, ensure that the Contract Manager container is running for them. Perform the following steps:

  1. Run the command

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

    The network-parameters ensure that the Contract Manager and the instances can connect to each other via internal, not public, connections. This can be configured in different ways within the infrastructure of the customer. See the following examples:

    • Add --network <name>. This parameter adds the instance 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.

    • Add -p <n>:10600 to use the KCM Designer for Windows on client machines. This parameter forwards connections to port n on the Docker host through port 10600 of the instance container. When installing the KCM Designer for Windows, fill in the Docker host for the KCM Repository host and port n for the KCM Repository port.

  2. The entry-point-parameters are the parameters that are passed to StartInstance.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 StartInstance.exe parameters for more information.

    The entry-point-parameters must be placed at the end of the command after the image name. If a parameter references a file, this file should be accessible from the container when it is started. For example, you may 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.

  3. The entry point will be executed as soon as the container starts. It logs its output to 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.

    The entry point process connects to the KCM Repository database and modifies it. If the entry point process fails after this point, it can still be run again. In this case, you need to change the Instance!DatabaseMode parameter to "Check".

    The entry point process registers the instance on the Contract Manager. If the entry point process fails after this point, it can still be run again, provided that you change Registration!NewContract to False, since the contract already exists at that point. Furthermore, if Registration!Force is set to True, the second instance overwrites the registration of the first one.

See the following examples of commands with all options included.