Customizing the Docker container

The Docker containers can be customized with custom tabs and extensions.

Fix Pack 2 - GA

Most of the customization requires additional JAR files and JSP files, with modification to the data_entry_properties.xml, flow-config.xml, and the common.properties configuration files.

The Product Master application runs with was and svcuser non-root users. Both these users belong to svcgroup group. Ensure that you use appropriate user while customizing the Docker images.

was svcuser
ipm-admin-ubi7 ipm-sch-ubi7
ipm-persona-ubi7 ipm-wfl-ubi7
ipm-fts-pim-ubi7
ipm-fts-indexer-ubi7
ipm-ml-ubi7
ipm-gds-ubi7
Following is the automation process to place the custom JAR files in the $TOP folder or configure as additional dependencies by using the jars-custom file. The JAR files get added to the Product Master class path.
+-- top-jars
+-- custom-jars  
+-- Dockerfile
+-- public_html
¦   +-- user
+-- user-scripts
top-jars
Copy the jar files to this directory. These jars are added in the $TOP folder.
custom-jars
Copy the jar files to this folder if you want to add them through the jars-custom file.
user-scripts
Pre-configuration or Post-configuration (Any processing before/after the configureEnv.sh file) through pre-config.sh, post-config.sh scripts. Any processing after the installation but before service starts, copy the script to this folder.
public_html/user
Any other files that need to be copied into image.
Sample Dockerfile to update the Persona-based UI image
FROM ipm-persona:12.0.0

USER root

RUN mkdir -p /home/was/user-scripts; \
mkdir -p /home/was/custom-jars; \
mkdir -p /home/was/files

COPY user-scripts/*.sh /home/was/user-scripts/
COPY custom-jars/*.jar /home/was/custom-jars/
COPY etc/default/flow-config.xml /home/was/files/
COPY etc/default/data_entry_properties.xml /home/was/files/
COPY public_html/user/*/home/was/files/

RUN chmod 755 /home/was/user-scripts/*.sh; \
    chown was.svcgroup /home/was/ -R;

USER was

WORKDIR /home/was
ENTRYPOINT ["./cmd.sh"]
Sample Dockerfile to make some root level changes in the Scheduler image
FROM ipm-sch-ubi7:12.0.0

USER root
RUN mkdir -p /home/oracle; \
    chown svcuser:svcgroup /home/oracle -R;

USER svcuser

WORKDIR /home/svcuser
ENTRYPOINT ["./cmd.sh"]

Additional configuration is required, for custom tabs and entry preview functions that involve interaction between the UI elements in the Admin UI and the Persona-based UIs. You can perform the configuration by using the post-config.sh script. When the container is initialized, the post-config.sh script runs and updates the configuration. In the following example, an entry preview script is configured to open a new results window.

Sample Dockerfile
FROM ipm-persona:12.0.0

USER root

RUN mkdir -p /home/was/user-scripts; \
mkdir -p /home/was/custom-jars; \
mkdir -p /home/was/files

COPY user-scripts/*.sh /home/was/user-scripts/
COPY custom-jars/*.jar /home/was/custom-jars/
COPY etc/default/flow-config.xml /home/was/files/
COPY etc/default/data_entry_properties.xml /home/was/files/
COPY public_html/user/*/home/was/files/

RUN chmod 755 /home/svcuser/user-scripts/*.sh; \
    chown was.svcgroup /home/was/ -R;

USER was

WORKDIR /home/was
ENTRYPOINT ["./cmd.sh"]
Sample pre-config.sh script

#!/bin/sh

echo "Starting pre-config.sh script....."
cp -f /home/files/flow-config.xml /opt/MDM/etc/default/
cp -f /home/files/data_entry_properties.xml /opt/MDM/etc/default/
cp -f /home/files/CustomAction.jsp /opt/MDM/public_html/user/CustomAction.jsp
cp -f /home/files/SamplePage.jsp /opt/MDM/public_html/user/SamplePage.jsp
cp -f /home/files/systemTab.css /opt/MDM/public_html/user/systemTab.css 

sed -i "s/^xframe_header_option=.*/xframe_header_option=ALLOWALL/g" /opt/MDM/etc/default/common.properties
Sample post-config.sh script
#!/bin/sh

echo "Starting post-config.sh script....."
cp -f /home/files/flow-config.xml /opt/MDM/etc/default/
cp -f /home/files/data_entry_properties.xml /opt/MDM/etc/default/
cp -f /home/files/CustomAction.jsp /opt/MDM/public_html/user/CustomAction.jsp
cp -f /home/files/SamplePage.jsp /opt/MDM/public_html/user/SamplePage.jsp
cp -f /home/files/systemTab.css /opt/MDM/public_html/user/systemTab.css 

sed -i "s/^xframe_header_option=.*/xframe_header_option=ALLOWALL/g" /opt/MDM/etc/default/common.properties
To display the results, perform the following additional configuration:
  • Setting the value of the xframe_header_option=ALLOWALL for both the ipm-admin and the ipm-persona containers in the common.properties property.
  • Initializing the ipm-persona container by configuring the Admin UI port by using the MDM_APP_SVR_PORT argument.