Building custom Docker images for use with an Oracle database
By default, when you deploy HCL Commerce Docker containers, the containers
are configured to connect to an IBM Db2 database that is named
mall
, with a database user name wcs
. If your database type
is different, then you must update the Docker containers to contain the required
driver.
Before you begin
About this task
Specifically, the containers that require this driver are:
- The Transaction server.
- The Search server (For Solr and NiFi connections, depending on the search solution that is used).
- The Utility server.
Procedure
-
Add the Oracle driver to the required containers.
Add the following lines to each Dockerfile script.
TheCOPY
command copies the Oracle JDBC driver to the specified directory within the customized Docker image.- Transaction server
COPY ojdbc8.jar /SETUP/driver/oracle/
- Search server (Solr-based search
solution)
COPY ojdbc8.jar /opt/WebSphere/Liberty/usr/shared/resources/
- NiFi Search server (Elasticsearch-based search
solution)
COPY ojdbc8.jar /opt/nifi/nifi-current/lib/
- Utility server
COPY ojdbc8.jar /SETUP/driver/oracle/ojdbc8.jar COPY ojdbc8.jar /opt/WebSphere/CommerceServer90/lib/ojdbc8.jar
- Transaction server
-
Build the customized Docker image.
docker build -f /path/to/Dockerfile .
The custom Docker images, containing the required driver, are generated.