Project

General

Profile

Testing Using Docker

Introduction

This section shows you how to setup for testing using the Docker development environment. By using dbash.sh, you are creating a container that can:
  • Allowing port access via those mapped ports to processes within the container
  • Allowing access to mapped resources, such as the homespace that the given user has permissions to, some of which will persist when changes are made.
  • Allowing access to the Docker image's files that the given user has permissions to.
  • Network resources that are bridged (unless host option is chosen) so networks are isolated

Port Usage

The dbash.sh command has options to allow certain ports to access running processes. When you start dbash.sh, the options to enable ports are:
Host Side Container Side Usage Option to Enable
7443 7443 Web Client --port-gui
7449-7459 7449-7459 Web Client --port-gui
2080 2080 Server debug --port-debug
5000 5000 Client debug --port-debug
22100 22100 Java Management Extensions (JMX) --port-jmx
5432 5432 PostgreSQL --port-pg=5432 *

* - Pass a different value to --port-pg=<port> if the container-side port used by PostgreSQL was changed via the --pgport=<port> option.

You are given control over which of these ports are opened via options to dbash.sh as you may be running on a cloud-based environment and not want ports being listened to unless specified. If you are contacting the container through the host, the name you reach out to is localhost, and the port is then redirected into the container.

Web Client

When the standard server is started in the container, you should be able to connect via port 7443 using http://localhost:7443/gui from a browser, provided --port-gui was specified. Likewise, if the Admin Console has been enabled, it can be reached with https://localhost:7443/admin. If there is a ChUI application available, http://localhost:7443/chui should also be available.

Eclipse Debugger

When the standard server is started with the debug option, port 2080 is available to connect to, provided the --port-debug was specified. You can configure the debugger to connect via localhost:2080.

Java Listening

In our Hotel GUI example, the ./deploy/server/server.sh script that starts the FwdLauncher server process provides the option to debug it with -d. Ultimately this results in the addition of a Java command line option which includes the port the Java process will listen on for debug connections. Inside the container, we have to make sure to add global addressing to the port so the code that checks if debug is request has a check for being inside a docker container (-f "/.dockerenv"):

if [ "$debug" == true ]; then
   [ -f "/.dockerenv" ] && daddress="0.0.0.0:${dport}" || daddress="${dport}" 
   dtxt="-agentlib:jdwp=transport=dt_socket,server=y,suspend=${suspend},address=${daddress}" 
fi 

so the additional like would become:
"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=0.0.0.0:2080" 

instead of:
"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=2080" 

in the Docker Development container.

This would be the case for most any process that would normally be able to listen on a port for local access. It would need a prefix of a wildcard of 0.0.0.0: or *:

Heap Dump and Logs

Because dbash.sh is giving access to the user's HOME space, any heap dumps, jstack output or logs are persisted as long as they are directed to the HOME area of the user. The root filesystem is owned by the Docker image, and won't be persisted.


© 2004-2026 Golden Code Development Corporation. ALL RIGHTS RESERVED.