My webMethods Server 10.15 | My webMethods Server Webhelp | Administering My webMethods Server | Startup and Configuration | Using My webMethods Server with Docker | Running and Customizing My webMethods Server Containers | Installing My webMethods Server Components and Custom Applications | Custom Applications in My webMethods Server Containers
 
Custom Applications in My webMethods Server Containers
Despite the general recommendation to include all required custom applications before generating a Docker image for a My webMethods Server installations, in certain occasions and especially for non-production environments you might require to install a custom application in a container on top of the image from which you start the container. My webMethods Server containers include a predefined directory /MWS/volumes/apps on the container file system, in which you can place assets to copy to the /deploy directory of the My webMethods Server instance. You can install custom applications in a container in one the following ways:
*Using the docker cp command - to copy the application package from the host machine to the /MWS/volumes/apps directory of a running container. This approach hot deploys the application and does not require restarting the container. However, you cannot use this approach if your application includes dependencies to external libraries. You cannot remove or uninstall an application that you hot-deploy using the docker cp command.
*Using a bind-mounted directory from the host files system - use the -v option of the docker run command to bind mount a directory from the host that contains one or more applications to deploy when starting up a new container. At container startup My webMethods Server copies all files from the host directory to the /MWS/volumes/apps of the container, and subsequently - to the /deploy directory for the instance. To remove an application, delete it from the mounted directory and restart the container.
*Using a named volume - use the -v option of the docker run command to mount a named volume that contains one or more applications to deploy when starting up a new container. At container startup My webMethods Server copies all files from the volume to the /MWS/volumes/apps of the container, and subsequently - to the /deploy directory for the instance. To remove an application, delete it from the volume and restart the container.
My webMethods Server persists a list of all deployed applications in a .properties file on the MWS/volumes/data directory in the container and its mounted volume, which is anonymous by default.
You can override the container locations of both the /apps and the /data directories, using the environment variables for My webMethods Server. For more information, see Environment Variables that My webMethods Server Containers Support.
Examples
*The following example creates the named volume tasks and uses it to deploy task applications to a container, created from the webM107 image:
docker volume create tasks
docker run -e
DB_URL="jdbc:wm:sqlserver://dbhost:1439;databaseName=MWSDOCKER;user=wmuser;password=manage"
-e DB_TYPE=ms -v tasks:/opt/softwareag/MWS/volumes/apps -p 8585:8585 webM107
Note:
The custom task applications are copied to the volume from the host before issuing the docker run command.
*The following example uses bind-mounts the host directory /home/myvm/taskapps to deploy task applications to a container, created from the webM107 image:
docker run -e
DB_URL="jdbc:wm:sqlserver://dbhost:1439;databaseName=MWSDOCKER;user=wmuser;password=manage"
-e DB_TYPE=ms -v
/home/myvm/taskapps:/opt/softwareag/MWS/volumes/apps -p 8585:8585
webM107
Note:
The custom task applications must be present in the bind-mounted directory.
*The following example uses bind-mounts the host directory /home/myvm/taskapps to deploy task applications to a container, created from the webM107 image and copies all applications to the /tasks directory in the container, instead of in the default /apps directory:
docker run -e
DB_URL="jdbc:wm:sqlserver://dbhost:1439;databaseName=MWSDOCKER;user=wmuser;password=manage"
-e DB_TYPE=ms -v /home/myvm/taskapps:/opt/softwareag/MWS/tasks -e
APPS_DIR=/opt/softwareag/MWS/tasks -p 8585:8585
webM107
Note:
The custom task applications must be present in the bind-mounted directory. The MWS/tasks directory, referenced by the APPS_DIR environment variable is created at container startup.