Dockerfile for TIBCO BusinessEvents

TIBCO BusinessEvents provides the Dockerfile for installation of TIBCO BusinessEvents software inside the Docker container. The Dockerfile with the name Dockerfile (without any file extension) is located at the BE_HOME/docker/bin folder.

Dockerfile is a script, which consists of various commands to automatically perform actions on a base image to create a new one. Dockerfiles simplify the process of deployment.

Dockerfiles begin with defining an image (FROM command), which starts the build process. Followed by various other methods, commands and arguments (or conditions), in return, provide a new image which is to be used for creating docker containers.

The Dockerfile is then supplied to the Docker daemon to build an image.

Syntax of the Dockerfile commands is:
Command argument argument ... 
For example,
# Print "Hello docker!"
RUN echo "Hello docker!"

The following sections identify the key commands that setup key configurations for the BusinessEvents Docker image. For more details on each command of Dockerfile, refer to the Docker documentation at https://docs.docker.com/engine/reference/builder/.

Environment Variables (ENV Command)

The ENV command is used to set the environment variables (one or more). These variables consist of "key = value" pairs which can be accessed within the container by scripts and applications alike. The usage of the ENV command is:
ENV key value
The default BusinessEvents Dockerfile setup the following environment variables using the ENV command:
  • CDD_FILE: Path of the BusinessEvents application CDD file. The application Dockerfile provides this value.
  • EAR_FILE: Path of the BusinessEvents application enterprise archive. The application Dockerfile supplies this value.
  • PU: The name of the processing unit to run. The value is provided at the runtime by the user. The default value is default.
  • AS_DISCOVER_URL: Discovery URL of the ActiveSpace. The value is provided at the runtime by the user.
  • ENGINE_NAME: TIBCO BusinessEvents engine name. The default value is be-engine.
  • LOG_LEVEL: Logging level for BusinessEvents. The value is overridden at run time by the user. The default value is na.
# BusinessEvents Environment Variables
ENV CDD_FILE no-default
ENV PU default
ENV EAR_FILE no-default
ENV ENGINE_NAME be-engine
ENV LOG_LEVEL na
ENV AS_DISCOVER_URL self

Data Volumes (VOLUME Command)

The VOLUME command is used to enable access from your container to a directory on the host machine (i.e. mounting it). The usage of the VOLUME command is:
VOLUME /dir1, /dir2 ...
Using data volumes you can persist the data across docker runs. For example, in the default Dockerfile ActiveSpaces Shared Nothing file stores, log file locations, and Rule Management Server directories are configured. The Docker volumes for them are created and all internal file paths are rooted to the specified directories. The following values are overridden in the CDD which is built into the application image
  • /mnt/tibco/be/logs - Directory where log files are stored.
  • /mnt/tibco/be/data-store - Directory where shared nothing data is stored.
  • /opt/tibco/be/BE_SHORT_VERSION/rms/config/security - Directory which holds the rule management server application’s ACL (permission configuration) and user.pwd files.
  • /opt/tibco/be/BE_SHORT_VERSION/examples/standard/WebStudio - The repository directory for BusinessEvents Webstudio which where all projects are stored.
  • /opt/tibco/be/BE_SHORT_VERSION/rms/config/notify - Directory where email notification configuration files are stored.
  • /opt/tibco/be/BE_SHORT_VERSION/rms/lib/locales - Directory where the user locale configuration is stored.
  • /opt/tibco/be/BE_SHORT_VERSION/rms/bin/logs - Directory where rule management server and Webstudio logs are stored.

BE_SHORT_VERSION: TIBCO BusinessEvents software version in the short form. For example, for TIBCO BusinessEvents version 5.4.0 the BE_SHORT_VERSION is 5.4.

#BusinessEvents Volumes
VOLUME /mnt/tibco/be/logs
VOLUME /mnt/tibco/be/data-store

#RMS Volumes
VOLUME /opt/tibco/be/${BE_SHORT_VERSION}/rms/config/security
VOLUME /opt/tibco/be/${BE_SHORT_VERSION}/examples/standard/WebStudio
VOLUME /opt/tibco/be/${BE_SHORT_VERSION}/rms/config/notify
VOLUME /opt/tibco/be/${BE_SHORT_VERSION}/rms/lib/locales
VOLUME /opt/tibco/be/${BE_SHORT_VERSION}/rms/shared

Ports (EXPOSE Command)

The EXPOSE command is used to associate a specified port to enable networking between the running process inside the container and the outside world (that is, the host). The usage of the EXPOSE command is:
EXPOSE port1 port2 ...
By default the following ports are exposed by the base BusinessEvents image:
  • 50000: This is the ActiveSpaces listen port exposed by the base image.
  • 5555: This is the JMX port exposed by the base image.
  • 8090 and 5000: These are the rule management server port exposed by the base image.
# This will always be the listen port for AS
EXPOSE 50000 

# JMX Port
EXPOSE 5555

#RMS PORTs
EXPOSE 8090 5000 

These ports can be mapped during Docker run.