[Docker Series] Introducing Docker Compose to our Docker containers

We are back with another post from this new docker series oriented in our prefered environment, TIBCO environment and the idea is to introduce one of the newest tools in the Docker environment and how we could use it in our TIBCO docker containers.

In the previous post that you can read here, we create our first docker container with an EMS server inside. If we try to run this machine we need to do that with a very large run command, something like that:

docker run -tid -p 7222:7222 ems ./ems.sh

Even if we use more complex configuration (the ones we are going to learn in the following chapters) we have a more complex sentence. A sentence we have to type every single time we want to start our container. Is this the only way to do that? The anwser is no. We could use Docker cCmpose to simplify this sentence.

Docker Compose is the new brand of an existing tool in the Docker environment called Fig.Fig was a tool that allows you mainly to start group of machines with dependencies easily. Fig works this way:

  • You create a configuration file (docker-compose.yml or fig.yml) where you specify all the dependencies between the containers.
  • You also could introduce configuration values for each container you defined.

So we could define all these parameters inside the YML configuration file, so we could start the same machine only using this command in the folder where is located the YML configuration file.

docker-compose up


A little bit smaller, don’t you think? :).

Ok, but how we create this YML configuration file? It’s so easy to create because it uses a YML format. The YML is the supra-language of the JSON format. And here is an example of this configuration file focused on our EMS docker container:



2 thoughts on “[Docker Series] Introducing Docker Compose to our Docker containers

  1. Any clue about the ems.sh file, please ? Its content was described neither in this article nor in the previous one. Thanks for sharing.

    • UPDATE After different requests, here is my current content of the ems.sh file, but I think I’m going to use another method to share with you all the technical details, maybe using our GitHub repo or something similar:

      cd /home/user/tibco

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s