Monday, 21 December 2015

Mule ESB with Docker

One of the advantages with Docker is that there is a that are ready to be used, and even extended if one so wishes. Docker image is the one that I will use in this article. It is well documented, there is a source repository and it contains a recent version of the Mule ESB Community Edition. Some additional details on the Docker image:
  • Ubuntu 14.04.
  • Oracle JavaSE 1.7.0_65.
    This version will change as the  containing the package is updated.
  • Mule ESB CE 3.5.0
Note that the image may change at any time and the specifications above may have changed.
If you intend to use Docker in your organization, I would suspect that the best alternative is to create your own Docker images that are totally under your control. The Docker image repository is an excellent source of inspiration and aid even in this case.


Files and Docker Containers

So far we have managed to start a Mule instance running inside a Docker container, but there were no Mule applications deployed to it and the logs that were generated were only visible in the terminal window. I want to be able to deploy my applications to the Mule instance and examine the logs in a convenient way.
In this section I will show how to:
  • Share one or more directories in the host file-system with a Docker container.
  • Access the files in a Docker container from the host.
As the first step in looking at sharing directories between the host operating system and a Docker container, we are going to look at Mule logs. As part of this exercise we also set up the directories in the host operating system that are going to be shared with the Docker container.
  • In your home directory, create a directory named “mule-root”.
  • In the “mule-root” directory, create three directories named “apps”, “conf” and “logs”.
  • Download the Mule CE 3.5.0 standalone distribution from
  • From the Mule CE 3.5.0 distribution, copy the files in the “apps” directory to the “mule-root/apps” directory you just created.
  • From the Mule CE 3.5.0 distribution, copy the files in the “conf” directory to the “mule-root/conf” directory you created.
    The resulting file- and directory-structure should look like this (shown using the tree command):

No comments:

Post a Comment