Connecting php docker to mqtt docker

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

  1. Mqtt broker docker (

  2. How should I handle Perl module updates when maintaining docker images?
  3. ctrl+G in erl doesn't work
  4. Receiving a Connection Refusal in Zeppelin
  5. Docker swarm security and high availability on AWS
  6. I2C inside a docker container
  7. no space left on device while installing a tar using docker
  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?

  • Add file to jenkins workspace with docker
  • docker commit data container to private registry
  • Remote Debugging .NET Core Linux Docker Container - “the current source is different from the version built into .dll”
  • How to filter docker client environment variables into a docker run command?
  • port redirect to docker containers by hostname
  • Isolate PHP applications with Docker
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.