Container Image
The DirX Directory container image is downloadable from the DirX support portal. This chapter describes the specifics of the DirX Directory container image.
Base Image
The DirX Directory container image is based on the latest opensuse/leap image hosted on hub.docker.com. As OpenSUSE is not a supported Linux platform, the delivered image is only intended to be used as an example in a test environment. For productive use, you must build your own docker image from one of the supported platforms as follows:
-
Get a DXD Linux installer from the Support Portal
(e.g., dirx91_9.7.382.1701.x86_lx-64.tar.gz). -
Extract the installer to a temporary folder.
-
Open the Dockerfile in the root of the extracted installer.
-
Change the base image name in the first line according to the selected platform (e.g., from
FROM opensuse/leap:15.6 AS base to
FROM registry.suse.com/suse/sle15:15.6 AS base). -
If the chosen platform uses a package manager other than zypper, update the RUN zypper — non-interactive in gdb tar rsync line accordingly.
-
Build the docker image using the modified Dockerfile according to the corresponding docker documentation: https://docs.docker.com/build. (e.g., docker image build -t dxd:9.7.138)
Content
The DirX Directory container image contains a full, standalone DirX Directory installation with all the server and client binaries. As in a standard Linux installation, the servers are automatically started by the dirxdsas process, which serves as the container entry point. The container image uses the UID 5000 and GUID 5000 to run the DirX Directory service.
Tagging
The DirX Directory container image is delivered with a single container image tag that contains the full version number; for example, dxd:9.7.317. By default, no other tag is provided. Additional tags can be created in the target system’s image registry as necessary.
Initialization Scripts
By default, the DirX Directory container image does not contain an initialization script, but it does allow for the use of custom initialization scripts like other container images. These scripts can be used for database initialization or for executing any necessary initialization steps.
Any executable scripts mounted into the /home/dirx/entrypoint-init.d/ folder are executed using the bash shell.The scripts are executed before the database is started, so any tools requiring exclusive access to the database (like dbamboot or dirxload) can be used, but scripts must not rely on any of the DirX Directory services to be running. For details on DirX Directory commands, see the chapter “DirX Commands” in the DirX Directory Administration Reference.
Environment Configuration
The safest and recommended way to set environment variables in a DirX Directory installation is to set them in the DIRX_INST_PATH/conf/dirxenv.ini configuration file. This is also the recommended way to set the environment for the DirX Directory container image. To work on the dirxenv.ini file, mount it to the /home/dirx/conf/dirxenv.ini path. For details on DirX Directory environment variables, see the chapter “Environment Variables” in the DirX Directory Administration Reference.
Networking
The DirX Directory container image uses the DirX Directory ports defined in the “IP Port Numbers” chapter of the DirX Directory Administration Reference. These ports can be exposed to the external network on demand.
Database Files
The DirX Directory container image only supports using a file-based DBAM database. Database files can be automatically created by implementing the logic in an initialization script, or they can be initialized by running a DirX Directory container image in which the database files can be created.
In addition to the database and translog files, the following files must also be persisted:
-
.DIRX_SyncFile – this file is the synchronization interface between different DirX Directory tools and servers.
-
.DBAM_Profile – this file stores the DBAM profiles used on the system.
As these files are read and modified by the servers and tools, they must be persisted using a volume with read and write permissions like the database files. By default, these files are stored in the $DIRX_INST_PATH/server/conf folder. However, in a containerized environment, configuration files and folders are usually mounted with read-only permissions. To solve this problem, you can use the DIRX_SYNC_FILE_PATH and DIRX_DBAM_PROFILE_PATH environment variables to configure the paths for these files so that they are stored in read-write locations, either with the DBAM database and translog files or on a separate read-write volume. See the environment configuration in the example DirX Directory Kubernetes project for an example.