Starting from version 12.1C10 openFT is prepared to run in constrained environment, such as Openshift. Due to the lack of access to root after generating of Docker image new mode is introduced, called limited multi user mode. Despite its name, it is similar to single user mode. The main difference is that in this new mode, unprivileged user is allowed to create instances. The new “limited multi-user mode”, activated via the command "ftsetmode -lm -ga = root: root", may only be used in a containerized environment. An instance created in multi user mode become FT administrator and can perform usual administrative tasks.
Worth to notice that instance is created without systemd support, due to lack of systemd in containerized environment, therefore during building, installing or calling some commands warnings related to it appears.
An exemplary Dockerfile is attached to openFT package in docker/OpenShift location:
CD.ftv410.openFT12.1C10_F70.1_20201201.tgz
|-- docker
| |-- OpenShift
| | |-- Dockerfile
|-- install.ft
|-- openFT-12.1C10-410.x86_64.rpm
The Docker file is contained in docker/OpenShift directory and may be similar to the following:
Dockerfile:
# Example docker file for OpenShift # Base system is Redhat8. FROM registry.access.redhat.com/ubi8/ubi # Install packages required RUN yum install openssl procps net-tools tar -y; yum clean all ENV PACKAGE_DIR /root/openFT_tmp # switch to temporary directory for openFT package handling RUN mkdir $PACKAGE_DIR WORKDIR $PACKAGE_DIR # Copy the openFT package the root dir. The desired package should be the only one in the # directory. COPY CD.ftv*.openFT*.tgz . # Untar the openFT package to the root dir. RUN tar -xvf CD.ftv*.openFT*.tgz # Install openFT. RUN rpm -i openFT-*.x86_64.rpm # set workdir back to root's home WORKDIR /root # cleanup temporary directory RUN rm -vfr $PACKAGE_DIR # Switch to hidden limited multi user mode available under openshift environment. RUN /opt/openFT/bin/ftbin/ftsetmode -lm -ga=root:root # Expose basic port used by openFT. EXPOSE 1100 # Set entry point to the exemplary start script. ENTRYPOINT "/opt/openFT/bin/ftbin/openft_init"
In the example, it runs default openft_init (present in the rpm file). The openft_init script may be similar to the following:
openft_init:
# Export path to the openFT binaries. export PATH=$PATH:/opt/openFT/bin # Extract ip address of eth0 interface. ip_addr=`ifconfig eth0 | grep "inet " | tr -s ' ' | cut -f3 -d ' '` # Create instance a new user, with eth0 ip address. ftcrei openft -addr=$ip_addr # Switch to created instance, to allow usage of openFT for new user. . ftseti openft # Start openFT service. ftstart # Start /sbin/init as and long time running process. exec /sbin/init
The purpose of the script is to create a proper instance (that will be bound to the eth0 interface ipv4 address, on port 1100) and start the openFT service automatically on each OpenShift’s container restart. In the example, /sbin/init has been selected as long running process (process that in case of end or crash will trigger container’s restart).
Having above structure one can build the Docker image, push it to the OpenShift cluster, and run it. These steps are out of the scope of this document.
Additional notes:
In case of necessity of performing other operations that requires root access (like installing FTAM, FTP, JAVA, or any other), the Dockerfile will have to be expanded, or used as a base. Also exporting other required ports, need to be done during the image build. The user may need to configure file transfer admission.
In recent openFT, usage of systemd was introduced. Under docker/podman build environment the systemd is not available (under container running in OpenShift environment, the case is the same). This may lead to some warning messages during image building process (and can be ignored).
During the ftsetmode command, ftstart is being invoked, which under podman build environment will not work (additional messages will be printed). This is not a problem in case of working container afterwards.
Altered File tree on the ISO image with an example docker file for Suse Linux Enterprise Server (SLES)
So far there was only one DockerFile dedicated for RedHat provided with installation package. Since openFT 12.1C90, there will be also second DockerFile dedicated for Suse Linux Enterprise Server system having the same logic only slightly altered commands to correspond correctly with commands available on given system.
An exemplary Dockerfile is attached to openFT package in docker/OpenShift location:
CD.ftv490.openFT12.1C90_Linux_F70.1_20250605.tgz
|-- docker
| |--
Redhat
| | |-- OpenShift
| | | |-- Dockerfile
| |--
SUSE
| | |-- Dockerfile
New DockerFiles will be placed in installation package in subsequent paths:
openFT_V12.1C90_Linux\docker\RedHat\OpenShift\Dockerfile
openFT_V12.1C90_Linux\docker\Suse\Dockerfile
Both DockerFile documents will now contain additional line of instruction, which will look as follows:
ENV OPENFT_OS_ENV container
It will make openFT skip SystemD check in ftstart/ftstop/ftcrei scripts and won’t display to user information about missing systemD.