Running an application typically involves multiple processes whether that’s just an application server and database or multiple service implementations in a microservice architecture. Docker Compose provides a quick and easy mechanism to build, deploy, and run your application, whether locally on your system for development purposes or on a platform such as Docker Datacenter for production.

For the purposes of this example we have taken Docker’s example voting application and modified it so that the voting and results web applications are Java applications running on WebSphere Liberty. You can clone the updated application from GitHub and, assuming that you have Docker and Docker Compose installed, run it using the following simple commands:

git clone https://github.com/kavisuresh/example-voting-app.git
cd example-voting-app
docker-compose up

The following video gives an introduction to the example voting application and how it can be run using Docker Compose:

The following video talks about Docker Datacenter configuration and how the application can be run in Docker Datacenter using Docker Compose:

2 comments on"Running a multi-container application using Docker Compose"

  1. Elson Yuen July 26, 2016

    That problem was a known bug in WDT which has been fixed on the latest version 16.0.0.2. If you install the latest version of WDT, the problem should be no longer exists.

  2. Great video and example code. I’ve also followed the videos on WDT with liberty and docker.

    It would be helpful to have a post on eclispe/WDT support for multi-container (microservice) applications. For example, if I attempt to create multiple Liberty Docker servers using WDT I run into conflicts with multiple “defaultServer” names. All I can ever get working is a single Liberty Docker server to connect to a single container at a time. Also, I was unable to get a server to connect to the running containers in this example at all.

    A post on using WDT for multi-container applications and WDT debugging across multi-container applications would be very well received.

Join The Discussion

Your email address will not be published. Required fields are marked *