This article demonstrates how to build Docker images using Command Central Docker Builder. Docker Builder allows the creation of docker images based on Command Central Templates. With templates you can generate automated reproducible installations of webMethods components.
This is a basic example generating a docker image with a minimal Microservice Runtime. The template is kept simple in order to focus on how a template is used with dockerbuilder. Once the basic functionality is understood, you should be able to insert your own templates.
The sources used can be found on Github: https://github.com/SoftwareAG/webmethods-integration-examples/tree/master/dockerbuilder-microserviceruntime
Command Central Docker Builder is a tool provided by Software AG on Docker Store.
How it works
- Dockerbuilder will load any (single!) template which resides within the directory of the build context.
- Licenses are expected in a zip file a subdirectory licenses/licenses.zip. This way multiple licenses can be loaded.
- The installation is done by a command central server into the directory /opt/softwareag which is registered in the cc server as node.
- The command central server will be removed using a multistage build, so only the product installation will remain.
- Build arguments are set in the docker-compose. Variables for the template may be provided in env.properties.
- Docker Engine 17.05 or newer with support for multi-stage builds
- Access to Empower with the right to download software
- A valid license file for Microservice Runtime
Get the sources
Copy or clone the files from Github https://github.com/SoftwareAG/webmethods-integration-examples/tree/master/dockerbuilder-microserviceruntime to a local directory
Login to Docker Store with your Docker ID, open Command Central image page. Proceed to Checkout and accept license agreement to get access to Command Central images.
Login to Docker with your Docker ID from your console and verify you can download the images:
docker login docker pull store/softwareag/commandcentral-builder:10.3
Add license file
Create directory licenses in this location Copy licenses as zip to licenses/licenses.zip
Set EMPOWER CREDENTIALS
Provide your Empower SDC credentials (email and password):
Linux or Mac:
export EMPOWER_USRfirstname.lastname@example.org export EMPOWER_PSW=*****
set EMPOWER_USRemail@example.com set EMPOWER_PSW=*****
To build the microservice container image run:
docker-compose build msr ... Successfully tagged softwareag/msrbuild:10.3
N.B.: This will take some time to run, as it downloads the installationfiles and does a full installation. Afterwards you will have a container image which can be started quite fast.
Verify the image by launching the container and running a simple test, e.g.:
docker run --name msrbuild -p 55555:5555 softwareag/msrbuild:10.3
Open a browser and go to http://localhost:55555. Login with user: Administrator, password manage (You need to wait until IS is started up which may take a minute).
Inspecting the logs
If you want to monitor the startup sequence or any other logs later on
Open a shell inside the container
docker exec -ti msrbuild bash
Tail the server.log by
tail -f /opt/softwareag/IntegrationServer/instances/default/logs/server.log
Running on Windows host
Your Docker build runs on Windows and fails, ensure that git client uses UNIX crlf instead of Windows. Change git configuration and re-clone the repository
git config --global core.autocrlf false
Contact us at Tech Community if you have any questions.
For more information, you can Ask a Question in the Tech Community Forums.
You can find additional information in the Software AG Tech Community.
DISCLAIMER These tools are provided as-is and without warranty or support. They do not constitute part of the Software AG product suite. Users are free to use, fork and modify them, subject to the license agreement. While Software AG welcomes contributions, we cannot guarantee to include every contribution in the master project.