Preparing Docker Volumes

A Docker volume (commonly referred as data volume) is a specially-designated directory within one or more containers that bypasses the Union File System. Docker volumes provide several useful features for persistent and shared data. Docker volumes can be shared and reused among containers.

Docker volumes persist even if the container itself is deleted. You can create a Docker volume container from an existing image. The volume container has the mapping of the host's directory to the container. For further information, refer to the Docker documentation on volume.
Before you start running the Docker containers, you are required to have the following directories on the host machine:
  • The $OM_HOME/roles/configurator/standalone/config directory. This directory contains all the configuration files required by the Configurator server; this directory is mapped as a data volume inside the fom-configurator Docker containers.
    Note: All the other containers refer to the database to access any of the property files.
  • The model loading directories. These are the directories setup to load the product and planFragment, action. These models are loaded by the Order Management Server and no other container needs this volume mapping other than the Order Management Server container.
  • A logs directory that you must create.

Procedure

  • Create a logs directory where logs from all the containers are available on your host machine. For example, $OM_HOME/logs.
    Note: Since the Docker container reads and writes in the three directories mentioned, it is mandatory to give read and write privilege to others on the host machine on the directories where you are creating volumes. Since Docker is writing to the existing files in the volume, each file in the volume must have read and write privileges. For example:
     $] chmod o+rw -R
    $OM_HOME/roles/configurator/standalone/config