Creating Docker Images for CONNX Components on Linux
CONNX provides Docker scripts to create Docker images for the CONNX components on Linux. Docker scripts are provided for the CONNX Data Server, the CONNX License server, and the CONNX JDBC server. The following section describes how to create Docker images for the JDBC server and the License server.
1. After you launch the Install Shield Wizard for CONNX Client, select the transfer method. If the target system does not have an FTP, SFTP, or SCP server enabled, select Manual Copy Installation and click Install.
This action creates the necessary installation files in the UNIXCLIENT\TEMPINST subdirectory of the CONNX installation directory. Move these files via an alternate copy method to the UNIX server and proceed to step 6.
2. Select the Docker checkbox.
3. If the target system has an FTP, SFTP, or SCP server enabled, select that transfer method and enter the following login information: TCP/IP host name or address for your system platform, user account name, user account passowrd, and alternative directory (optional). By default, the CONNX client data is sent to your home directory.
4. Click Install. The installation is complete.
5. If the CONNX client is not installed successfully, check the relevant log file for any errors. If the files fail to copy via the FTP, SFTP, or SCP session, use the Manual Copy Installation transfer method.
6. Once the files are copied manually, a dialog box appears asking you to log on to your system and run the installclient shell script.
7. Run ./installclient .
8. To create a Docker image, run the terminal emulator and navigate to the directory you specified in the file transfer window. This directory contains several files, including two template Docker files. Dockerfile.jdbcserver is the template for building a Docker image for the JDBC Server. Modify the Dockerfile.jdbcserver script to include your custom configuration settings and DSN entries.
The CDDs used by the docker image are externalized and should be placed in the host docker system. Refer to Completing CONNX Installation for UNIX JDBC Servers for the specific commands to add to the docker script for creating DSNs.
9. Build a Docker image for the CONNX license server using docker build -t connxvvvjdbcserver . -f./Dockerfile.jdbcserver, where vvv is the current CONNX version number, for example 138.
10. Build a docker image for the CONNX license server: docker build -t connxvvvlicenseserver . -f./Dockerfile.licenseserver, where vvv is the current CONNX version number, for example 138.
11. To run the CONNX JDBC docker image, use: docker run -d -e "ACCEPT_EULA=Y" --name cnxclient -v Config file location:/config:z -p external port:7502 connxvvvjdbcserver.
, where vvv is the current CONNX version number, for example 138. Config file location should contain the CONNXREG64.db file which holds the CONNX configuration information for the JDBC server. This directory should also contain your CONNX CDD files. Ensure that the directory on the host system has an owner and group of sagadmin with an id of 1724. The external port is the port number for connecting to the JDBC server.
12. To run the CONNX license server docker image, use: docker run -d -e "ACCEPT_EULA=Y" --name cnxlicense -v license file location:/license:z -p external port:7501 connxvvvlicenseserver.
License file location should contain your CONNX license database. The lincense database is created and maintained by the license server and it is external from the docker image. Ensure that the directory on the host system has an owner and group of sagadmin with an id of 1724. The external port is the port number for connecting to the license server.
To manage and verify the created image and container, use the following commands:
Show the available docker images:
docker images
Start the docker image - for example:
docker run -d -e "ACCEPT_EULA=Y" --name cnxclient -v /home/cnxuser/config:/config:z -p 20002:7502 connx138jdbcserver
Show the log:
docker logs cnxclient
Show the containers:
docker ps -a
Stop the container:
docker stop cnxclient
Delete the container:
docker rm cnxclient
Remove the image:
docker image rm connx138jdbcserver