Use this information to plan how and when you want your IBM® Integration Bus Docker container to be stopped.
When you run IBM Integration Bus in
Docker, there are several requirements to consider. The sample build
process, using the supplied Dockerfile (at https://github.com/ot4i/iib-docker) provides a way to satisfy those requirements.
If you would prefer to use your own image, you must consider how the
requirements are handled.
Process supervision:
When
you run a Docker container, you run a single process (PID 1 inside
the container), which can later spawn child processes. If the main
process ends, Docker stops the container. An IBM Integration Bus integration node requires some
processes to be running, so you must ensure that your main process
stays active as long as the node is running. It is good practice to
check that the node is active from this process, which you can do
by performing administrative queries. If you use the sample that
is provided for IBM Integration Bus, at https://github.com/ot4i/iib-docker, you can see that this task is done by the
script iib_manage.sh, which includes the following
code:
monitor()
{
echo "----------------------------------------"
echo "Running - stop container to exit"
# Loop forever by default - container must be stopped manually.
# Here is where you can add in conditions controlling when your container will exit - e.g. check for existence of specific processes stopping or errors being reported
while true; do
sleep 1
done
}