Running local binding applications in separate containers
With the addition of process namespace sharing between containers in Docker. You can now run applications that require a local binding connection to IBM® MQ in separate containers from the IBM MQ queue manager. This functionality is supported in IBM MQ 9.0.3 and later queue managers.
About this task
- Docker version 1.12 or later must be used.
- You must share the containers PID namespace using the
--pid
argument. - You must share the containers IPC namespace using the
--ipc
argument. - You must either:
- Share the containers UTS namespace with the host using the
--uts
argument, or - Ensure the containers have the same hostname using the
-h
or--hostname
argument.
- Share the containers UTS namespace with the host using the
- You must mount the IBM MQ data directory in a volume that is available to the all containers under the /var/mqm directory.
You can try this functionality out, by completing the following steps on a Linux® system that already has Docker 1.12 or later installed.
The following example uses the sample IBM MQ Docker container image. You can find details of this image on Github.
Procedure
Results
You now have local applications running in separate containers, and you can now successfully run
commands like dspmq, amqsput, amqsget, and
runmqsc as local bindings to the QM1
queue manager from the
secondary container.
If you do not see the result you expected, see Troubleshooting your namespace applications for more information.