Docker volumes

Docker volumes are directories and files that exist on the host file system outside of the Docker container. These volumes are used to persist data and share data between Docker containers.

Docker supports the mounting of one or more data volumes from the host operating system to the Docker container. If the mount information for multiple data volumes contain the same hostDir, Docker only applies the last one and ignores any earlier mount information. The same behavior also applies to mount information for the containerDir. By default, IBM® Spectrum Symphony mounts $EGO_TOP, $SOAM_DEPLOY_DIR (if the service does not use a package, IBM Spectrum Symphony mounts the service binary absolute path), and service package dependency directories to containers with read-only permission, and service workDir to containers with read-write permission. The container directories for those mount volumes are the same as the host directories. For example, if IBM Spectrum Symphony is installed at /opt/ibm/spectrumcomputing, then this path will be exposed to the container as /opt/ibm/spectrumcomputing as well.

You can configure the mounting of extra data volumes to a container and provide permissions from the application profile and client API. The client API supports C++, Java, .NET, and Python languages; refer to the API Reference documentation. Symphony applies mounted volumes in the following order:

  1. Default mount volumes (for example, $EGO_TOP and $SOAM_DEPLOY_DIR).
  2. Mount definition in the application profile from beginning to end.
  3. Mount definition from the client API in the order that the API calls were made.
For example, hostDir1:containerDir1 defined in the application profile can be overridden by hostDir1:containerDir2 defined by the client API.
Note: The host directory specified for a data volume must be an absolute path. Symphony does not resolve environment variables specified for a host directory.

The $EGO_TOP and $SOAM_DEPLOY_DIR directories cannot be overridden.