You can translate the document:

Introduction

The aim of this article is to explain how to build your own Docker images. This is not an introductory document to Containers so we assume that the reader already has some knowledge of Docker.

We will explain the steps for Denodo 9 and Denodo 8 as the process will be different.

Building images for Denodo 9

This section of the document applies to Denodo 9 and later.

Note: Official images are based on ubi9-minimal. In this section the image generation for the official base image and Debian images is described. If you are using any other distribution, please check OS package dependencies and install them in your distribution.

Building the Docker images

In the following sections, a complete process will be described for building Docker images with the Denodo Platform installed.

There are two ways of creating a Docker image with Denodo:

Extending provided Docker image (recommended)

Requisites:

  1. Access to https://harbor.open.denodo.com/. Check Denodo Container Registry Quick Start Guide for how to login into the registry.
  2. Create a customized Dockerfile with the instructions to build the image.
  3. Execute the docker build command in the build folder.

This kind of build is the “Docker way” of doing things. By building in this way, the already packaged product is used and only tools/scripts must be installed/added to the image as the installation of the Denodo product is already done.

The base image is a Red Hat Universal Base Image 9 Minimal (ubi9-minimal) and the tool for installing new packages is microdnf. Check the Red Hat documentation to learn how to use this tool.

Creating a Dockerfile

To start building the image, a directory could be organized in this way (as an example):

/denodo-docker-build/

├── bin/

│     └── my-script.sh

└── Dockerfile

In this example, we will install mssql-tools and add a custom script to the image. The Dockerfile would be like this:

# In the FROM clause, the harbor image used as base is specified.

# In the case of this example, the last version of denodo-platform is used.

# Any other tag or image could be used.

# Check https://community.denodo.com/docs/html/document/latest/en/Denodo%20Container%20Registry%20Quick%20Start%20Guide

FROM harbor.open.denodo.com/denodo-9/images/denodo-platform:latest

# The user is changed to use the package manager

USER root

# Clause to configure shell to work properly with pipes

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

# Use tools provided inside the container.

# In this example, a new package repository is configured as well as

# a new package is installed

RUN curl https://packages.microsoft.com/config/rhel/9/prod.repo | tee /etc/yum.repos.d/mssql-release.repo \

    && ACCEPT_EULA=Y microdnf install -y mssql-tools18 \

    && microdnf clean all

ENV PATH=$PATH:/opt/mssql-tools18/bin

# Copy the custom script to its end directory.

# The `chown` argument ensures that the final script will

# have the proper ownership

COPY --chown denodo:denodo bin/my-script /usr/local/bin

# Ensure that the script has proper permissions to execute

RUN chmod u+x /usr/local/bin/my-script

# This last user change is made to start the container with the default Denodo container user.

# Products installed in the image are owned by `denodo` user.

USER denodo

Executing the docker build command

At this point, everything is ready to generate the new image. In order to generate the new Denodo Platform image a command line must be opened into the recently created build directory (the one containing the Dockerfile) and the following command should be executed:

$ docker build -t denodo-platform:latest .

Please check that the execution of this command has occurred without errors.

Build Docker image from scratch

Building an image for Denodo Platform involves:

  1. Generating a Denodo Platform auto-installation XML file. A Denodo Platform installer compatible with the host system’s OS must be downloaded.
  2. Preparing a build folder with the auto-installation XML file, a zipped Denodo Platform installer for Linux, and a Dockerfile.
  3. Creating a customized Dockerfile with the instructions to build the image using the Denodo Platform auto-installation file.
  4. Executing the docker build command in the build folder.

Please note that if significant modifications to the Dockerfile are not necessary and access is available to a Denodo Support Site account, it is recommended to follow the instructions in the Denodo Container Registry Quick Start Guide document to download Denodo images from the Harbor container registry.

Generating an auto-installation file

To generate an auto-installation file, a Denodo Platform installer corresponding to the host system’s OS must be downloaded and unzipped on the host machine. Note that this is independent of the OS used in the image you intend to build. Follow the instructions to generate the auto-installation file depending on the installed OS.  The generated file will be referred to as install.xml hereinafter.

The installer sets the Denodo Platform installation path in the file according to the OS for which it was generated. Update the installation path in the file with the syntax of the Linux base image that will be used to generate the Container image. The “INSTALL_PATH” key should look like the following in the install.xml file:

<entry key="INSTALL_PATH" value="/opt/denodo"/>

It is assumed from now on that the Denodo Platform will be installed in the path /opt/denodo.

Preparing the build directory

To start creating the image, a directory must be set up to run the docker build command:

/denodo-docker-build/

├── builderfs/

│     ├── denodo-install/

│     │   ├── denodo-install-xxx.zip

│     │   └── install.xml

│     ├── denodo-update/

│     │    └── denodo-update-X.Y.Z.jar

│     └── container-scripts/

│          └── denodo-container-scripts-denodo-9.zip

└── Dockerfile

Fill the structure with the specific files:

  • /builderfs/denodo-install/:
  • The zipped Denodo installer: denodo-install-xxx.zip
  • Note that this installer must be a version compatible with the image’s Linux distribution.
  • The auto-installation file, named install.xml
  • /builderfs/denodo-update/:
  • In this directory, a Denodo update file (ending in .jar) can be added in order to automatically apply the update to the image.
  • /builderfs/container-scripts/:
  • This directory should include the zipped scripts denodo-container-scripts-denodo-9.zip. These scripts are used to automate the management of the Denodo image; more information about these scripts can be found in the Denodo Container Scripts section.
  • The customized build file, named Dockerfile.

Denodo Container Scripts

These scripts are specific for Denodo containers and allow for automatic setup of the Denodo process before starting. The ENTRYPOINT instruction in the Dockerfile uses it to configure and launch the Denodo process. Furthermore, it ensures that the entrypoint script receives the Unix signals on container shutdown in order to properly shutdown the Denodo process.

The container’s configuration can be modified by providing environment variables and mounting specific volumes. See the Denodo Docker container configuration document for more information.

Creating a Dockerfile

The following Dockerfile is a skeleton that can be used to build organization specific Denodo images. Using the ubi9-minimal:latest image as the base, this Dockerfile copies the downloaded Denodo Platform Linux installer and the generated auto-installation file from the host to the image file system in order to install the Denodo Platform on a container. It uses a multi-stage build to optimize the Dockerfile and reduce the size of the final image.

### Stage 1 - install ###

# Review latest debian version here https://catalog.redhat.com/software/base-images#get-images

FROM registry.access.redhat.com/ubi9/ubi-minimal:latest AS builder

RUN microdnf update -y; \

    microdnf install -y unzip \

        findutils; \

    microdnf clean all

# The Denodo installation requires the denodo installer, the update (optional) and the install.xml file for unattended installation.

COPY builderfs /opt

WORKDIR /opt/denodo-install

# Installing using the proper script provided within the installer

RUN unzip \*.zip;\

    mv ./*/* .;\

    chmod +x installer_cli.sh; \

    ./installer_cli.sh install --autoinstaller install.xml

# Updating the installation if an update is provided

# PATH of JRE. This will be the default JRE used to run Denodo Platform.

ENV PATH="/opt/denodo/jre/bin:${PATH}"

#  || : will force a zero exit status

# Clause to configure shell to work properly with pipes

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

RUN find /opt/denodo-update/ -name "denodo*jar" | sort | while read -r file; do echo "Applying ${file##*/}"; bash -c "yes | java -jar ${file} /opt/denodo -c"; done

RUN find /opt/denodo -name "./*.back.*" -type f -delete

WORKDIR /opt/container-scripts

RUN mkdir -p /opt/denodo/tools/container \

    && unzip \*.zip -d /opt/denodo/tools/container \

    && sed -i "s/\r$//" /opt/denodo/tools/container/*.sh \

    && chmod +x /opt/denodo/tools/container/*.sh

   

### Stage 2 - final ###

FROM registry.access.redhat.com/ubi9/ubi-minimal:latest

ENV DENODO_HOME=/opt/denodo

# Install required libs for some components like denodo-monitor, ...

RUN microdnf install -y \

        shadow-utils \

        net-tools \

        procps-ng \

        hostname \

        jq \

        findutils \

        tar; \

    microdnf clean all; \

    rm -rf /var/cache/*

# Create the system denodo user and group

RUN groupadd -r denodo && useradd --no-log-init -m -r -g denodo -c "Denodo user" denodo

COPY --from=builder --chown=denodo:denodo "${DENODO_HOME}" "${DENODO_HOME}"

RUN "${DENODO_HOME}"/tools/container/postunpack.sh

VOLUME [ "/denodo", "/container-entrypoint-preinit", "/container-entrypoint-init", "/container-entrypoint-prestop" ]

USER denodo

# Sets the workdir

WORKDIR ${DENODO_HOME}

EXPOSE 10091 9999 9998 9997 9996 9995 9099 9098 9097 9090 9000 8999 8998 8000 7999 7998

ENTRYPOINT [ "/opt/denodo/tools/container/entrypoint.sh" ]

CMD ["--help"]

Creating a Debian based Dockerfile

The following Dockerfile is a skeleton that can be used to build organization specific Denodo images. Using the debian:stable image as the base.

### Stage 1 - install ###

# Review latest debian version here https://hub.docker.com/_/debian/

FROM debian:stable AS builder

RUN apt-get update -y; \

    apt-get install --no-install-recommends -y unzip \

        findutils; \

    apt-get clean all

# The Denodo installation requires the denodo installer, the update (optional) and the install.xml file for unattended installation.

COPY builderfs /opt

WORKDIR /opt/denodo-install

# Installing using the proper script provided within the installer

RUN unzip \*.zip;\

    mv ./*/* .;\

    chmod +x installer_cli.sh; \

    ./installer_cli.sh install --autoinstaller install.xml

# Updating the installation if an update is provided

# PATH of JRE. This will be the default JRE used to run Denodo Platform.

ENV PATH="/opt/denodo/jre/bin:${PATH}"

#  || : will force a zero exit status

# Clause to configure shell to work properly with pipes

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

RUN find /opt/denodo-update/ -name "denodo*jar" | sort | while read -r file; do echo "Applying ${file##*/}"; bash -c "yes | java -jar ${file} /opt/denodo -c"; done

RUN find /opt/denodo -name "./*.back.*" -type f -delete

WORKDIR /opt/container-scripts

RUN mkdir -p /opt/denodo/tools/container \

    && unzip \*.zip -d /opt/denodo/tools/container \

    && sed -i "s/\r$//" /opt/denodo/tools/container/*.sh \

    && chmod +x /opt/denodo/tools/container/*.sh

   

FROM debian:stable

ENV DENODO_HOME=/opt/denodo

# Install required libs for some components like denodo-monitor, ...

RUN apt-get update; \

    apt-get install -y --no-install-recommends \

        net-tools \

        procps \

        curl \

        jq; \

    rm -rf /var/lib/apt/lists/*

# Create the system denodo user and group

RUN groupadd -r denodo && useradd --no-log-init -m -r -g denodo -c "Denodo user" denodo

COPY --from=builder --chown=denodo:denodo "${DENODO_HOME}" "${DENODO_HOME}"

RUN "${DENODO_HOME}"/tools/container/postunpack.sh

VOLUME [ "/denodo", "/container-entrypoint-preinit", "/container-entrypoint-init", "/container-entrypoint-prestop" ]

USER denodo

# Sets the workdir

WORKDIR ${DENODO_HOME}

EXPOSE 10091 9999 9998 9997 9996 9995 9099 9098 9097 9090 9000 8999 8998 8000 7999 7998

ENTRYPOINT [ "/opt/denodo/tools/container/entrypoint.sh" ]

CMD ["--help"]

Executing the docker build command

At this point, everything is ready to generate the new image. In order to generate the new Denodo Platform image a command line must be opened to the recently created build directory (the one containing the Dockerfile). Then, the following command should be executed:

$ docker build -t denodo-platform:latest .

Please check that the execution of this command has occurred without errors.

Deploying in Red Hat OpenShift

For deploying in Red Hat OpenShift, the image based in ubi must be used as it is more compatible.

The OpenShift Container Platform runs containers using an arbitrarily assigned user ID. For an image to support execution as an arbitrary user, directories and files that may be written to by processes in the image should be owned by the root group and should be readable and writable by that group. The group should also be granted execute permissions over files that should be executable.

In order to run the Denodo container using an arbitrarily assigned user ID, the following should be added to the Dockerfile in order to allow users in the root group to access the Denodo process’ files:

RUN chgrp -R 0 /opt/denodo && chmod -R g=u /opt/denodo

A complete example of a Dockerfile for Denodo installed in a Red Hat Universal Base Image can be found below, as an example (please, take it as an example, many optimizations can be applied depending on the use case):

### Stage 1 - install ###

# Review latest ubi9 version here https://catalog.redhat.com/software/base-images#get-images

FROM registry.access.redhat.com/ubi9/ubi-minimal:latest AS builder

RUN microdnf update -y; \

    microdnf install -y unzip \

        findutils; \

    microdnf clean all

# The Denodo installation requires the denodo installer, the update (optional) and the install.xml file for unattended installation.

COPY builderfs /opt

WORKDIR /opt/denodo-install

# Creating user which will have permission

ENV UID=996

RUN groupadd -r denodo && useradd --no-log-init -r -g denodo -G root -c "Denodo user" -u $UID denodo

# Installing using the proper script provided within the installer

RUN unzip \*.zip;\

    mv ./*/* .;\

    chmod +x installer_cli.sh; \

    ./installer_cli.sh install --autoinstaller install.xml;

# Updating the installation if a update is provided

# PATH of JRE. This will be the default JRE used to run Denodo Platform.

ENV PATH="/opt/denodo/jre/bin:${PATH}"

#  || : will force a zero exit status

# Clause to configure shell to work properly with pipes

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

RUN find /opt/denodo-update/ -name "denodo*jar" | sort | while read -r file; do echo "Applying ${file##*/}"; bash -c "yes | java -jar ${file} /opt/denodo -c"; done

WORKDIR /opt/container-scripts

RUN mkdir -p /opt/denodo/tools/container \

    && unzip \*.zip -d /opt/denodo/tools/container \

    && sed -i "s/\r$//" /opt/denodo/tools/container/*.sh \

    && chmod +x /opt/denodo/tools/container/*.sh

RUN find /opt/denodo -name "*.back.*" -type f -delete; \

    chown -R "${UID}":0 /opt/denodo; \

    chmod -R g=u /opt/denodo

   

### Stage 2 - final ###

FROM registry.access.redhat.com/ubi9/ubi-minimal:latest

ENV DENODO_HOME=/opt/denodo

# Install required libs for some components like denodo-monitor, ...

RUN microdnf install -y \

        shadow-utils \

        net-tools \

        procps-ng \

        hostname \

        jq \

        findutils \

        tar; \

    microdnf clean all; \

    rm -rf /var/cache/*

# These are the OpenShift ticks.

# Ensure the user UID

ENV UID=996

# Copying the installation to end imagen

COPY --from=builder "${DENODO_HOME}" "${DENODO_HOME}"

# Creating the user and giving permissions to ensure that OpenShift user can execute

# write and read as it needs.

RUN groupadd -r denodo; \

    useradd --no-log-init -r -g denodo -G root -c "Denodo user" -u "$UID" denodo;

RUN "${DENODO_HOME}"/tools/container/postunpack.sh

VOLUME [ "/denodo", "/container-entrypoint-preinit", "/container-entrypoint-init", "/container-entrypoint-prestop" ]

USER denodo

# Sets the workdir

WORKDIR ${DENODO_HOME}

EXPOSE 10091 9999 9998 9997 9996 9995 9099 9098 9097 9090 9000 8999 8998 8000 7999 7998

ENTRYPOINT [ "/opt/denodo/tools/container/entrypoint.sh" ]

CMD ["--help"]

Building images for Denodo 8.0

This section applies to Denodo 8.0 update 20220815 and later.

Building the Docker images

In the following sections, a complete process will be described for building Docker images with the Denodo Platform installed.

Building an image for Denodo Platform involves:

  1. Generating a Denodo Platform auto-installation XML file. A Denodo Platform installer compatible with the host system’s OS must be downloaded.
  2. Preparing a build folder with the auto-installation XML file, a zipped Denodo Platform installer for Linux, and a Dockerfile.
  3. Creating a customized Dockerfile with the instructions to build the image using the Denodo Platform auto-installation file.
  4. Executing the docker build command in the build folder.

Please note that if significant modifications to the Dockerfile are not necessary and access is available to a Denodo Support Site account, it is recommended to follow the instructions in the Denodo Container Registry Quick Start Guide document to download Denodo images from the Harbor container registry.

Generating an auto-installation file

To generate an auto-installation file, a Denodo Platform installer corresponding to the host system’s OS must be downloaded and unzipped on the host machine. Note that this is independent of the OS used in the image you intend to build. Follow the instructions to generate the auto-installation file depending on the installed OS.  The generated file will be named install.xml in the subsequent sections.

The installer sets the Denodo Platform installation path in the file according to the OS for which it was generated. Update the installation path in the file with the syntax of the Linux base image that will be used to generate the Container image. The “INSTALL_PATH” key should look like the following in the install.xml file:

<entry key="INSTALL_PATH" value="/opt/denodo"/>

It will be assumed in the rest of the document that the Denodo Platform will be installed in the path /opt/denodo.

Preparing the build directory

To start creating the image, a directory must be organized to run the docker build command:

/denodo-docker-build/

├── builderfs/

│     ├── denodo-install/

│     │   ├── denodo-install-xxx.zip

│     │   └── install.xml

│     ├── denodo-update/

│     │    └── denodo-xxx-update-xxx.jar

│     └── container-scripts/

│          └── denodo-container-scripts-xxx.zip

└── Dockerfile

Fill the structure with the specific files:

  • /builderfs/denodo-install/:
  • The zipped Denodo installer: denodo-install-xxx.zip
  • Note that this installer must be a version compatible with the image’s Linux distribution.
  • The auto-installation file, named install.xml
  • /builderfs/denodo-update/:
  • In this directory, a Denodo update file (ending in .jar) can be added in order to automatically apply the update to the image.
  • /builderfs/container-scripts/:
  • This directory should include the zipped scripts denodo-container-scripts.zip. These scripts are used to automate the management of the denodo image; more information about these scripts can be found in the Denodo Container Scripts section.
  • The customized build file, named Dockerfile.

Denodo Container Scripts

These scripts are specific for Denodo containers and allow for automatic setup of the Denodo process before starting. The ENTRYPOINT instruction in the Dockerfile uses it to configure and launch the Denodo process. Furthermore, it ensures that the entrypoint script receives the Unix signals on container shutdown in order to properly shutdown the Denodo process.

The container’s configuration can be modified by providing environment variables and mounting specific volumes. See the Denodo Docker container configuration document for more information.

Creating a Dockerfile

The following Dockerfile is a skeleton that can be used to build organization specific Denodo images. Using the debian:stable image as the base, this Dockerfile copies the downloaded Denodo Platform Linux installer and the generated auto-installation file from the host to the image file system in order to install the Denodo Platform on a container. It uses a multi-stage build to optimize the Dockerfile and reduce the size of the final image.

### Stage 1 - install ###

# Review latest debian version here https://hub.docker.com/_/debian/

FROM debian:stable as builder-installer

 

RUN apt-get update \

 && apt-get install -y \

    zip \

 && rm -rf /var/lib/apt/lists/*

 

# The Denodo installation requires the denodo installer, the update (optional) and the install.xml file for unattended installation.

COPY builderfs /opt

 

WORKDIR /opt/denodo-install

 

RUN unzip \*.zip \

 && mv */* .\

 && chmod +x installer_cli.sh \

 && ./installer_cli.sh install --autoinstaller install.xml \

 && rm -r /opt/denodo-install

 

 

### Stage 2 - update ###

FROM builder-installer as builder-updater

 

WORKDIR /opt/denodo-update

# PATH of JRE. This will be the default JRE used to run Denodo Platform.

ENV PATH="/opt/denodo/jre/bin:${PATH}"

#  || : will force a zero exit status

RUN find /opt/denodo-update/ -name "denodo*jar" | sort | while read file; do echo "Applying ${file##*/}"; yes | java -jar ${file} /opt/denodo -c; done \

 && cd /opt/denodo \

 && rm -r /opt/denodo-update \

 && find . -name \*.back.* -type f -delete

 

 

### Stage 3 - builder-scripts ###

FROM builder-updater as builder-scripts

 

WORKDIR /opt/container-scripts

RUN mkdir -p /opt/denodo/tools/container \

 && unzip \*.zip -d /opt/denodo/tools/container \

 && sed -i "s/\r$//" /opt/denodo/tools/container/*.sh \

 && chmod +x /opt/denodo/tools/container/*.sh \

 && rm -r /opt/container-scripts

 

 

### Stage 4 - final ###

FROM debian:stable

 

ENV DENODO_HOME=/opt/denodo

 

# Install required libs for some components like denodo-monitor, ...

RUN apt-get update \

 && apt-get install -y \

    net-tools \

    procps \

    curl \

    jq \

 && rm -rf /var/lib/apt/lists/*

 

# Create the system denodo user and group

RUN groupadd -r denodo && useradd --no-log-init -m -r -g denodo -c "Denodo user" denodo  

 

COPY --from=builder-scripts --chown=denodo /opt/denodo/ /opt/denodo/

 

RUN /opt/denodo/tools/container/postunpack.sh

 

# Sets the workdir

WORKDIR $DENODO_HOME

 

VOLUME [ "/denodo", "/container-entrypoint-preinit", "/container-entrypoint-init", "/container-entrypoint-prestop" ]

 

USER denodo

ENTRYPOINT [ "/opt/denodo/tools/container/entrypoint.sh" ]

CMD ["--help"]

 

Executing the docker build command

At this point, everything is ready to generate the new image. In order to generate the new Denodo Platform image a command line must be opened to the recently created build directory (the one containing the Dockerfile) and the following command should be executed:

$ docker build -t denodo-platform:latest .

Please check that the execution of this command has occurred without errors.

Deploying in Red Hat OpenShift

The Dockerfile template provided above uses a Debian image as the base system. However, to deploy Denodo in a Red Hat OpenShift cluster, the container image must be based on the Red Hat Universal Base Image (UBI).

It is possible to create the Denodo container based on a different image base by simply replacing the text debian:stable in the Dockerfile with the preferred UBI image, and making some minor changes.

For example, if you want to use ubi8 you can replace the line in the template that indicates:

FROM debian:stable

with:

FROM registry.access.redhat.com/ubi8/ubi:latest

Replace apt-get with yum and:

rm -rf /var/lib/apt/lists/*

with:

yum clean all -y

The OpenShift Container Platform runs containers using an arbitrarily assigned user ID. For an image to support execution as an arbitrary user, directories and files that may be written to by processes in the image should be owned by the root group and should be readable and writable by that group. The group should also be granted execute permissions over files that should be executable.

In order to run the Denodo container using an arbitrarily assigned user ID, the following should be added to the Dockerfile to allow users in the root group to access the Denodo process’ files:

RUN chgrp -R 0 /opt/denodo && chmod -R g=u /opt/denodo

A complete example of a Dockerfile for Denodo installed in a Red Hat Universal Base Image can be found below:

### Stage 1 - install ###

# Review latest ubi version

FROM registry.access.redhat.com/ubi8/ubi:latest as builder-installer

RUN yum -y update \

 && yum -y install \

    zip \

 && yum clean all -y

# The Denodo installation requires the denodo installer, the update (optional) and the install.xml file for unattended installation.

COPY builderfs /opt

WORKDIR /opt/denodo-install

RUN unzip \*.zip \

 && mv */* .\

 && chmod +x installer_cli.sh \

 && ./installer_cli.sh install --autoinstaller install.xml \

 && rm -r /opt/denodo-install

### Stage 2 - update ###

FROM builder-installer as builder-updater

WORKDIR /opt/denodo-update

# PATH of JRE. This will be the default JRE used to run Denodo Platform.

ENV PATH="/opt/denodo/jre/bin:${PATH}"

#  || : will force a zero exit status

RUN find /opt/denodo-update/ -name "denodo*jar" | sort | while read file; do echo "Applying ${file##*/}"; yes | java -jar ${file} /opt/denodo -c; done \

 && cd /opt/denodo \

 && rm -r /opt/denodo-update \

 && find . -name \*.back.* -type f -delete

### Stage 3 - builder-scripts ###

FROM builder-updater as builder-scripts

WORKDIR /opt/container-scripts

RUN mkdir -p /opt/denodo/tools/container \

 && unzip \*.zip -d /opt/denodo/tools/container \

 && sed -i "s/\r$//" /opt/denodo/tools/container/*.sh \

 && chmod +x /opt/denodo/tools/container/*.sh \

 && rm -r /opt/container-scripts \

 && chgrp -R 0 /opt/denodo && chmod -R g=u /opt/denodo

### Stage 4 - final ###

FROM registry.access.redhat.com/ubi8/ubi:latest

ENV UID=1001 DENODO_HOME=/opt/denodo

# Install required libs for some components like denodo-monitor, ...

RUN yum -y update \

 && yum -y install \

    net-tools \

    procps \

    curl \

    jq \

 && yum clean all -y

# Create the system denodo user and group

RUN groupadd -r denodo && useradd --no-log-init -m -r -g denodo -G root -c "Denodo user" -u $UID denodo \

    && mkdir -p /opt/denodo && chown $UID:0 /opt/denodo && chmod g=u /opt/denodo

COPY --from=builder-scripts --chown=$UID:0 /opt/denodo/ /opt/denodo/

# Sets the workdir

WORKDIR $DENODO_HOME

VOLUME [ "/denodo", "/container-entrypoint-preinit", "/container-entrypoint-init", "/container-entrypoint-prestop" ]

## Specify the user with UID

USER $UID

ENTRYPOINT [ "/opt/denodo/tools/container/entrypoint.sh" ]

CMD ["--help"]

Testing the image

Denodo Licenses

The Denodo Platform requires a license to run. If it is intended to use a license managed by the License Manager the container can be started with the following environment variables:

  • DENODO_LM_PROTO: To indicate the protocol scheme: http or https. If this environment variable is not present, it takes the default value http.
  • DENODO_LM_HOST: To indicate the host of the License Manager.
  • DENODO_LM_PORT: To indicate the port of the License Manager. If the environment variable is not present, it takes the default value 10091.

$ docker run -d -h denodo-vdpserver -p 9999:9999 -p 9997:9997 -p 9996:9996 -p 9995:9995 -p 9090:9090 -e DENODO_LM_PROTO=http -e DENODO_LM_HOST=host.docker.internal -e DENODO_LM_PORT=10091 --name denodo-vdpserver denodo-platform:latest --vdpserver

Note that the container’s hostname should be registered in the Solution Manager before it starts, or else it will not be able to retrieve a license.

Alternatively, a Denodo standalone license (like the  Evaluation or Denodo Express licenses) can be mapped into the container from the host using Docker volume mount parameters.

$ docker run -d -h denodo-vdpserver -p 9999:9999 -p 9997:9997 -p 9996:9996 -p 9995:9995 -p 9090:9090 -v <path>:/opt/denodo/conf/denodo.lic --name denodo-vdpserver denodo-platform:latest --vdpserver

where:

-v <path>:/opt/denodo/conf/denodo.lic

Specifies the Standalone Denodo License file to use by the Denodo Server, where:

  • <path> - Path for the license file in the host OS, for example: /home/denodo/denodo.lic
  • /opt/denodo/conf/denodo.lic - Path for the license file in the container (This path MUST remain the same or the server will not start).

Starting several services

The container image’s entrypoint script is parametrized to indicate arguments for starting several services. For example:

$ docker run -d -h denodo-vdpserver -p 9999:9999 -p 9997:9997 -p 9996:9996 -p 9995:9995 -p 9090:9090 --name denodo-vdpserver denodo-platform:latest  --vdpserver --designstudio --datacatalog

These are the available arguments for the Denodo Platform image:

--vdpserver, --designstudio, --datacatalog, -–dmt, -–monitor, --schindex, --schserver, --schadmin 

As an alternative,  these servers can be manually started with the docker exec command after the Denodo Platform container has been started. For example, the Data Catalog can be started in a running Denodo container named “denodo” with the command:

$ docker exec -t denodo ./bin/datacatalog_startup.sh

Mounting external volumes

As this is a non-root container, the mounted files and directories must have the proper permissions for the user denodo (UID 999 by default).

Installing a new update

Denodo delivers new updates regularly to improve the user experience of the Denodo Platform. When a new update is released, the Denodo container that is available to download from the Denodo Support Site gets updated to the new version, so there is always a container with the latest version of Denodo ready to download.

However, there might be situations where it is necessary to build a container using a specific Denodo version that does not match that version available in the Support Site.

In those cases, the previous builder folder structure can be used to provide the corresponding jar file for updates or hotfixes at /builderfs/denodo-update/ and build the new image. Take into account that if there are several .jar files, they will be applied by alphabetical order.

The image can be built and tested using the same commands already provided in the previous sections of this article.

Disclaimer
The information provided in the Denodo Knowledge Base is intended to assist our users in advanced uses of Denodo. Please note that the results from the application of processes and configurations detailed in these documents may vary depending on your specific environment. Use them at your own discretion.
For an official guide of supported features, please refer to the User Manuals. For questions on critical systems or complex environments we recommend you to contact your Denodo Customer Success Manager.

Questions

Ask a question

You must sign in to ask a question. If you do not have an account, you can register here