Skip to content
  • There are no suggestions because the search field is empty.

Create a Container Image for HighByte Intelligence Hub

Create Container Images for Customized Deployments

Introduction

HighByte provides a container image available for download as a tar archive and one hosted on DockerHub. This image is suitable for most container needs, but certain situations may demand a custom image: hardened images with components removed to reduce a security exposure, additional jar files or libraries added for additional functionality, pre-included certificates for deployment, etc.

This article will describe the process for creating a new container image for HighByte Intelligence Hub with modifications. These modifications – if necessary – will be very specific to a given situation. 

Base Images

New container images begin with a base image. This is an image to which components may be added before exporting to a new image. The correct base image for a project depends on project goals, and choosing a base image with as many pre-included necessary features is often advantageous – fewer items to add is less responsibility and effort on the image creator. However, it is simpler to add features than to remove them, and for that reason, while it is possible to remove components from a base image, this article will only cover adding features for simplicity.

The simplest base image would be a lightweight and bare operating system on which a program can be installed. In many cases, Alpine Linux is an ideal choice for this. But HighByte Intelligence Hub requires some libraries that are not available on Alpine. Those images are available in Ubuntu, so Intelligence Hub is distributed with an Ubuntu-based image, and Ubuntu is a good choice as a base image. Further, Intelligence Hub uses a Java Virtual Machine (JVM) and Eclipse Temurin Ubuntu is a common Ubuntu image with a JVM pre-installed, making it an even better choice as a base image.

It is possible to use HighByte Intelligence Hub itself as a base image, but this applies best to adding features as mentioned above. This guide will demonstrate creating an Intelligence Hub image on Eclipse Temurin Ubuntu for demonstration, but the techniques here may be applies similarly if using Intelligence Hub as a base image.  

Additional Files

After deciding on a base image, the additional files must be acquired. The simple version of this is to download Intelligence Hub from highbyte.com and extract it to a directory that will be used as a reference to build the final image. This article will refer to this directory and the files therein as the “proto-image.” Once extracted, any other files may be added to the proto-image, like a starter project in appData/intelligencehub-configuration.json, a certificate store in appData/intelligencehub-certificatestore.pkcs12, or additional library files in runtime/lib (this may be helpful for MySQL where a third-party jar file is necessary.) Unnecessary files may also be removed from the proto-image. This may be desirable to reduce image size or security exposure. Likewise, since this container is based on Ubuntu linux, only the start-linux.sh and stop-linux.sh files are necessary to control the image, and the mac and windows scripts may be removed as well.

The files saved in this directory will reflect the files in the final container. Add or remove any necessary files to appData or runtime/lib now. This article will demonstrate generating an image using version 4.5.7, but similar steps may be taken for later images.

Additionally, a “dockerfile” is necessary. A dockerfile is practically a recipe, or set of instructions to take a base image, add some files, run some commands, and then finally generate an image. A starter dockerfile is included below.

 

Proto-image File Structure

Dockerfile

The dockerfile scripts actions that are taken to generate the final container image along with establishing settings for the image that will be presented to those running the container. The dockerfile used in this example is presented below and it may be downloaded here.

FROM eclipse-temurin:25.0.5.1_2-jre-noble

WORKDIR /highbyte
COPY ./HighByte-Intelligence-Hub-4.5.7/appData/ /highbyte/appData
COPY ./HighByte-Intelligence-Hub-4.5.7/runtime/ /highbyte/runtime
COPY ./HighByte-Intelligence-Hub-4.5.7/configuration/ /highbyte/configuration

# Make script executable
RUN chmod +x /highbyte/runtime/start-linux.sh

# Default environment variables
ENV OTEL_COLLECTOR_ENDPOINT="" \
JAVA_TOOL_OPTS="" \ START_MODE=""\
HA_NODE_ID=""\
HA_POSTGRES_URI=""\
DUMP_PATH=""

# Suggested ports
EXPOSE 45245
EXPOSE 1885
EXPOSE 8885
EXPOSE 9001

# USER defines user the container will be run as.
RUN adduser --system --no-create-home highbyteuser
RUN chown -R highbyteuser /highbyte
USER highbyteuser

# Entrypoint runs the start script
ENTRYPOINT ["/highbyte/runtime/start-linux.sh"]

This file is best understood in pieces. 

The beginning line
FROM eclipse-temurin:25.0.5.1_2-jre-noble 
defines the starting image that will used as a base. As described above, eclipse-temurin is a linux distribution with a Java runtime pre-installed. 21-jdk-alpine is a version tag that indicates this image has a Java 21 runtime installed atop Alpine Linux. This base image does NOT need to be downloaded or stored in advance.

The second block:
WORKDIR /highbyte
COPY ./HighByte-Intelligence-Hub-4.5.7/appData/ /highbyte/appData
COPY ./HighByte-Intelligence-Hub-4.5.7/runtime/ /highbyte/runtime
COPY ./HighByte-Intelligence-Hub-4.5.7/configuration/ /highbyte/configuration 
sets the starting point inside the container for the COPY commands, and those copy commands copy the locally-downloaded Intelligence Hub files into the container-image-to-be.
RUN chmod +x /highbyte/runtime/start-linux.sh
makes the start file executable so that Intelligence Hub can start.

The next block:
ENV OTEL_COLLECTOR_ENDPOINT="" \
    JAVA_TOOL_OPTS="" \
    START_MODE=""\
    HA_NODE_ID=""\
    HA_POSTGRES_URI=""\
    DUMP_PATH="" 
then defines all the expected environment variables and their default values. These will be edited (or not) by the user at runtime to set certain characteristics for the container like running in High Availability mode, or directing the runtime to certain OpenTelemetry resources.
Similarly, suggested ports are listed that define ports that should be exposed to the Intelligence Hub.
EXPOSE 45245
EXPOSE 1885
EXPOSE 8885
EXPOSE 9001

Lastly, a new user 'highbyteuser' is created, ownership over the Intelligence Hub files is transferred to the new user, and that users is selected to run the HighByte Intelligence Hub process.
RUN adduser --system --no-create-home highbyteuser
RUN chown -R highbyteuser /highbyte
USER highbyteuser
And then the starting process is defined for launching the container.
ENTRYPOINT ["/highbyte/runtime/start-linux.sh"]
This is the command that will be executed automatically when the new container launches. 

Process Walkthrough for Image Creation

With the context of the above additional pieces required to create the custom Docker image, the following is a step-by-step process to create the custom image. This assumes a prior installation of Docker or Docker Desktop.

  • Download Intelligence Hub from the HighByte Account Portal Downloads page. 
    • Extract the zip folder
    • Make note of the "inner folder" that holds appdata, runtime, and configuration directories. Above, this folder is named "HighByte-Intelligence-Hub-4.5.7"
  • Save the above dockerfile into the extracted directory alongside / next to the inner folder.
    • The dockerfile should simply be named 'dockerfile' with no extensions.
  • Remove the unnecessary macos and windows start and stop scripts from HighByte-Intelligence-Hub-4.5.7/runtime.
  • Open Windows Command Prompt or PowerShell and navigate to the proto-image - the directory in which you have stored the "inner folder" and the Dockerfile. 
  • In the same Powershell or Command Prompt, run the command docker build -t highbyteu:4.5.7 .
    This may take a few minutes to complete. 
    • This command instructs Docker to use the Dockerfile to create the image.
      • Docker will automatically download the required Eclipse-Temurin image necessary to start.
    • The image will be named "highbyteu" for "highbyte user" - this can be changed as desired
    • The -t flag indicates that the image will be tagged with 4.5.7 which is the Intelligence Hub version being used here. This is a good convention and should generally be followed.
    • The final '.' at the end means "use the resources here" to build the image. This is where we stored the
      dockerfile and the downloaded Intelligence Hub files.

 

  • Verify your image is available with the command docker image
Build an image from a dockerfile
If all is successful, the image should now be ready for use. 

Additional Resources