Setting up ThingWorx CXServer Docker Build
To build the additional ThingWorx Connection Server Docker image necessary to support ThingWorx HA, perform the following actions:
Download the cxserver dockerfile from the PTC Software Download page under ThingWorx Connection Server DockerFiles > ThingWorx-Connection-Server-DockerFiles-v.v.
Download the required CXServer files to the staging folder and make sure they’re available for the build process.
Modify the build.env variable file with appropriate values.
Required CXServer Files
The following files must be present in the staging folder.
The OpenJDK - Amazon Coretto 11.x.x file obtained from Amazon Web Services or the Java JDK (version 11 or 8) archive file obtained from Oracle.
If you want to use some other image as a base, make the required changes in dockerfiles\ignite\Dockerfile
Example file:
Save this file into the staging folder and make sure the JAVA_VERSION and JAVA_ARCHIVE variables in build.env file are correct.
ThingWorx Connection Server Archives
Download from the PTC Software Downloads site alongside this Dockerfile release.
Save these files into the staging folder and make sure the APP_ARCHIVEvariable in build.env file are correct.
Template Processor Archive
A tool provided by PTC to both parse templates inside the Docker container when it is starting to provide variables and format configuration files based on the running environment.
Example File:
Make sure this file in the staging folder matches the TEMPLATE_PROCESSOR_ARCHIVE variable in the build.env file.
CXServer build.env Variable
The build.env file contains a list of variables that you must set. The following variables must be set:
Variable Name
The version of the Amazon Coretto OpenJDK.
The name of the application, used to set home dir etc.
The Connection Server Library Version
The Connection Server Library zip name as it exists in the staging folder.
The version of the template-processor archive as it exists in the staging folder.
Staging CXServer Files
You must place the required files for building the Docker images in the staging folder that is part of this release. The staging folder should already contain a base platform-settings.json file.
To download ThingWorx CXServer automatically:
1. Make sure you have set the build.env file variables appropriately.
2. Run the command ./ stage.
If there are no errors, the files should be in the staging folder and they should match your build.env settings.
Was this helpful?