Overview
webMethods Microservices Runtime provides scripts that allows to generate Dockerfile and Docker images. This article provides quick reference on one of the ways to generate Docker images for webMethod Microservices Runtime and how you can run webMethods Microservices Runtime inside a Docker container.
Prerequisites
- You have some familiarity with the Docker technology.
- Docker version used for this articles is 18.03.1-ce
- You have Docker installed in your environment and it is running as a daemon.
Building Docker images
When you install webMethods Microservices Runtime, IntegrationServer/docker directory contains is_container script. You can use these scripts on any platform that has native support of Docker. Refer to webMethods Microservices Runtime guide for more information on this.
This script can be used to perform the following tasks.
- Generate base Dockerfile for webMethods Microservices Runtime
- Build base Docker image for webMethods Microservices Runtime
- Generate Dockerfile for webMethods Microservices Runtime containing custom packages
- Build Docker image containing custom package from the base Docker image
If your webMethods Microservices Runtime is installed under /opt/softwareag directory, following steps can be used to generate Docker image containing custom packages.
cd /opt/softwareag/IntegrationServer/docker
./is_container.sh createDockerfile or /is_container.sh createLeanDockerfile
./is_container.sh build
./is_container.sh createPackageDockerfile
./is_container.sh buildPackage
After successful execution of steps above, Docker image with name is:microPkg is created. Validate that Docker image is created successfully using the following command.
docker images
This will provide list of Docker images in your local Docker registry.
Running Docker Container
You can use the following command to run webMethods Microservices Runtime from the Docker image you created above.
docker run -d --name wm-msr -p 5555 -p 9999 is:microPkg
You can view the running Docker container with
docker ps -a
This will provide running container as below.
You can connect to the running container from Browser on the primary port that is mapped to port 32867 in the example above.
You can view server log with
docker logs -f <containerID>
What is Next?
webMethods Micorservices Runtime generates metrics in Prometheus format. These metrics can be viewed on Grafana Dashboard. This article provides details about how you can use Grafana to view metrics generated from webMethods Microservices Runtime