Software AG Products 10.11 | Running Business Processes and Composite Applications | Administering My webMethods Server | Startup and Configuration | Using My webMethods Server with Docker | Running and Customizing My webMethods Server Containers | Using External Libraries in My webMethods Server Containers
 
Using External Libraries in My webMethods Server Containers
You can add third-party libraries, custom jar files, and fragment bundles to My webMethods Server when staring up a new container. By default, My webMethods Server containers provide a directory SAGHOME/MWS/volumes/libs to which you can mount an external volume. When you create a new My webMethods Server container, the startup script for My webMethods Server copies all third-party libraries and custom jar files, available in the mounted volume to the MWS/lib directory to load when My webMethods Server initializes.
You can override the default location of the SAGHOME/MWS/volumes/libs directory within the container using the LIBS_DIR environment variable on container startup. If the directory referenced by the variable does not exist on the container file system, the Docker daemon creates the directory.
To customize the manifest of a third-party library, or add a jar file as a fragment to another bundle, provide a bind instruction as described in Adding Custom JAR Files and place the bind file in the volume together with the jar file.
Examples
The following example starts a new container from the myMWSImage and mounts an external volume to the default SAGHOME/MWS/volumes/libs directory on the container file system as a source for external libraries to be loaded by My webMethods Server when the instance initializes:
docker run -v var/lib/docker/volumes/myMWSVolume/test/extlibs:SAGHOME/MWS/volumes/libs -p 8585:8585 myMWSImage
The following example starts a new container from the myMWSImage, mounts an external volume to the opt/softwareag/MWS/myLibsDir directory on the container file system and overrides the default SAGHOME/MWS/volumes/libs directory with the opt/softwareag/MWS/myLibsDir directory as a source for external libraries to be loaded by My webMethods Server.
docker run -v var/lib/docker/volumes/myMWSVolume/test/extlibs:opt/softwareag/MWS/myLibsDir --env LIBS_DIR=opt/softwareag/MWS/myLibsDir -p 8585:8585 myMWSImage
In both examples, all libraries and custom jars from the mapped volume are copied to the MWS/lib directory and loaded by My webMethods Server on startup.