Creating the TIBCO BusinessWorks Container Edition Base Docker Image for Linux Containers

Follow these steps to create a base docker image for Linux containers.

Before you begin
  • Download the TIBCO BusinessWorks Container Edition runtime zip file, bwce-runtime-<version>.zip, from http://edelivery.tibco.com.

    To download this file,

    1. Select Container from the Operating Systems drop down list.
    2. Read and Accept the TIBCO End User License Agreement.
    3. Select the radio button for Individual file Download.
    4. Click the + sign to view the individual components and select bwce-runtime-<version>.zip.
  • An installation of Docker.
Note: TIBCO ActiveMatrix BuisnessWorks does not ship docker folder or scripts with it, because the scripts can be pulled directly from GitHub without installing TIBCO BusinessWorks Container Edition separately.
    Procedure
  1. Navigate to the TIBCO_HOME/bwce/<version>/docker directory.
  2. Copy the bwce-runtime-<version>.zip file to the TIBCO_HOME/bwce/<version>/docker/resources/bwce-runtime folder.
  3. Open a command terminal and run the following command from the TIBCO_HOME/bwce/<version>/docker folder:
    docker build -t TAG-NAME . 
    
    

    For example,

    docker build -t tibco/bwce:latest .

    By default, the debian:buster-slim image is used to create base docker image for TIBCO BusinessWorks Container Edition. The following is the dockerfile content.

    • Dockerfile content for debian:bullseye-slim:
      FROM debian:buster-slim
      LABEL maintainer="TIBCO Software Inc." ADD . / RUN chmod 755 /scripts/*.sh && apt-get update && apt-get --no-install-recommends -y install unzip ssh net-tools && apt-get clean && rm -rf /var/lib/apt/lists/*
      RUN groupadd -g 2001 bwce \
      && useradd -m -d /home/bwce -r -u 2001 -g bwce bwce
      USER bwce
      ENV LANG C.UTF-8
      ENV LC_ALL C.UTF-8
      ENTRYPOINT ["/scripts/start.sh"]

       

    You can also change the image with the following dockerfile content.

    • Dockerfile content for openSUSE:
      FROM opensuse/leap
      LABEL maintainer="TIBCO Software Inc."
      ADD . /
      RUN chmod 755 /scripts/*.sh && zypper -n update && zypper -n refresh && \
      zypper -n in unzip openssh net-tools 
      RUN groupadd -g 2001 bwce \
      && useradd -m -d /home/bwce -r -u 2001 -g bwce bwce
      USER bwce
      ENTRYPOINT ["/scripts/start.sh"]
    • Dockerfile content for CentOS 7:
      FROM centos:7
      LABEL maintainer="TIBCO Software Inc."
      ADD . /
      RUN chmod 755 /scripts/*.sh && yum -y update && yum -y install unzip ssh net-tools
      ENTRYPOINT ["/scripts/start.sh"]
    • Dockerfile content for CentOS 9:
      FROM quay.io/centos/centos:stream9
      LABEL maintainer="TIBCO Software Inc."
      ADD . /
      RUN chmod 755 /scripts/*.sh && yum -y update && yum -y install unzip ssh net-tools
      ENTRYPOINT ["/scripts/start.sh"]
    • Dockerfile content for eclipse-temurin:11-jre-alpine
      FROM eclipse-temurin:11-jre-alpine
      LABEL maintainer="TIBCO Software Inc."
      ADD . /
      RUN chmod 755 /scripts/*.sh && apk update && apk add unzip
      openssh net-tools
      RUN apk add --no--cache bash
      RUN addgroup -S bwcegroup && adduser -S bwce -G bwcegroup
      USER bwce
      ENTRYPOINT ["/scripts/start.sh"]
      Note: To use OpenJDK11 and remove TIBCO JRE from eclipse-temurin:11-jre-alpine based container image, navigate to https://github.com/TIBCOSoftware/bwce-docker/tree/openjdk-alpine and clone the 'eclipse-alpine' repository to your local machine. For more information to create the base Docker image for Linux container, see "Creating the TIBCO BusinessWorks Container Edition Base Docker Image for Linux Containers"
    • Dockerfile content for ubi8:
      FROM registry.access.redhat.com/ubi8/ubi:latest
      LABEL maintainer="TIBCO Software Inc." ADD . / RUN chmod 777 scripts/*.sh && yum install -y unzip net-tools && \
      yum update -y; yum clean all
      ENTRYPOINT ["/scripts/start.sh"]
    • Dockerfile content for rhel7-minimal
      FROM registry.access.redhat.com/rhel7-minimal
      LABEL maintainer="TIBCO Software Inc."
      ADD . /
      RUN chmod 777 scripts/*.sh && microdnf install unzip net-tools -enablerepo=rhel-7-server-rpms && \
      microdnf update; microdnf clean all
      ENTRYPOINT ["/scripts/start.sh"]
      Note: Ensure that you have valid Red Hat subscription for using rhel7-minimal.
    • Dockerfile content for Redhat Standard OS:
      FROM registry.access.redhat.com/rhel7/rhel
      LABEL maintainer="TIBCO Software Inc."
      ADD . /
      RUN chmod 777 scripts/*.sh && yum install -y unzip ssh net-tools && \
      yum update -y; yum clean all
      ENTRYPOINT ["/scripts/start.sh"]
    • Dockerfile content for AmazonLinux 2 OS:
      FROM amazonlinux:2
      LABEL maintainer="TIBCO Software Inc."
      ADD . /
      RUN chmod 777 scripts/*.sh && yum install -y unzip ssh net-tools && \ yum update -y; yum clean all
      RUN groupadd -g 2001 bwce \
      && useradd -m -d /home/bwce -r -u 2001 -g bwce bwce
      USER bwce
      ENV LANG C.UTF-8
      ENV LC_ALL C.UTF-8
      ENTRYPOINT ["/scripts/start.sh"]

ResultThe TIBCO BusinessWorks Container Edition base docker image is now created. This base docker image can now be used to create docker application images.

 

Support for stopping container gracefully.

To stop container gracefully in TIBCO Business Studio for BusinessWorks, run the following commands:

For Docker:

docker stop -t <timeout period in sec> <conainer name/ID>

By default, the timeout is 10 sec.It waits for seconds to stop before killing the container forcefully.

For Kubernetes:

You can customize the grace period by setting the terminationGracePeriodSeconds at the pod spec level, which defaults to 30 seconds.

spec:
containers: name: test image: ... terminationGracePeriodSeconds: 60