Using the preconfigured IBM Db2 Docker image
Rather than install the IBM Db2 Database and manually configure it for use with HCL Commerce, you can simply launch the preconfigured IBM Db2 Docker image as your development or test database.
Important: This IBM Db2 Docker container must be used for test purposes
only. Under no circumstance can this Docker image be used as your staging or production
database.
Note: The sample IBM Db2 Docker container bundled with HCL Commerce Version 9.1 includes contract price support for the new React-based store solutions. This has
an impact on the starter Aurora store or migrated Aurora-based stores when using Solr-based search,
and will cause you to see "Price pending" on the storefront. If you are using the sample Db2
database container for running an Aurora-based store with Solr-based search, and you are not using
contract-based pricing complete the following to disable contract pricing:
- Run the following SQL command against the
database:
update storeconf set VALUE='0' where NAME='wc.search.priceMode.compatiblePriceIndex';
- Refresh the HCL Commerce Registry in HCL Commerce Administration Console by navigate to , or simply restart the Transaction server.
Before you begin
- Download the latest HCL Commerce Version 9 Docker images. Included in these images is the IBM Db2 Docker image.
- Extract your IBM Db2 Docker image to a desired directory.
- If you are using Centos 7, with the default store driver overlay, you must change the default
storage driver to
devicemapper
. The IBM Db2 Docker image does not support the overlay storage driver. For more information about confuting the store driver in Docker, see Configure Docker with thedevicemapper
storage driver.
Procedure
-
Load the preconfigured IBM Db2 Docker image into Docker.
docker load -i Dockerimage
Where:- Dockerimage
- The preconfigured IBM Db2 Docker image file name.
-
Run the preconfigured IBM Db2 Docker image.
docker run -d -e LICENSE=accept --privileged -p port:50000 --name name db2-docker-image
Where:- port
- The port number that should be used for the host container, which is mapped to the
internal database, running on port 50000.
For example, use 50001 if you want to connect to the containerized database on port 50001.
- name
- A label to identify the usage for the container.
For example, auth_db, to identify that the container is used for the authoring environment database.
-
Verify that your IBM Db2 instance is running in one of two ways:
- Use your IBM Db2 client to connect to the IBM Db2 service.
- Log in to the IBM Db2 container to connect to the IBM Db2
instance by running the following
commands:
* docker exec -it db2ContainerId /bin/bash * su - db2inst1 * db2 connect to mall user wcs using wcs1
Where db2ContainerId is the IBM Db2 container ID.