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.
- 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.
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: