Connecting php docker to mqtt docker

I am developing an application in IBM Bluemix. I am having two dockers

  1. Mqtt broker docker (

  2. Docker Garbage collector not finding anything to delete
  3. How does a Docker engine replace a hypervisor and guest OS?
  4. Executing in python Docker container
  5. Finding Docker container processes? from host point of view
  6. Docker daemon and DNS
  7. Populating Docker containers with sensitive information using kubernetes
  8. Php apache based docker(

I am having a python code on my machine through which I intend to publish a message to Mqtt broker. Once published, I want the php docker to subscribe to Mqtt broker docker and display the message.

I am trying to connect to mqtt broker from php docker by giving the address of mqtt docker in php code as follows:

$mqtt = new phpMQTT("",1883, "PHPMQTTTrial"); //Change client name to something unique

echo "failed";
 echo "Success";

$topics['ferries/IOW/#'] = array("qos"=>0, "function"=>"procmsg");


echo "hi";



function procmsg($topic,$msg){
        echo "Msg Recieved: ".date("r")."\nTopic:{$topic}\n$msg\n";

However, it fails to connect.
Can someone guide and tell me how to go about this?

  • Using Docker for a mail server
  • How to change Docker default subnet size?
  • Dockerized web app connecting to MySQL DB on host
  • Ansible deploys Docker container to wrong Vagrant VM
  • Make Docker machine very fast
  • xmlrpc over nginx w/ scgi
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.