2017年5月2日 星期二

Install MQTT for Linux - using docker

Docker is very popular nowaday, so instead of installing MQTT broker directly on Linux, I try to find if there are any MQTT docker image. It's great that there is an official Mosquitto implementation of MQTT broker by Eclipse. Here are the procedure to install and test these Mosquitto-MQTT broker for Linux.

Linux server

    I'm running and Ubuntu 16.04.2 - 64 bit virtual machine on Digital Ocean, but I think the setup procedure should be the same on a real Linux machine.  I originally run a 32bit version ubuntu VM, but docker only support 64bit version, so I destroy the previous one and create a new 64bit version.

Install Docker

  The first step is , of course, to install the Docker. I use "curl" to install, so install curl first,



Then install docker



You also need to add your user to docker group



The following command will download the eclipse-mosquitto image then create a container (that also mean running the mosquitto services)
web sites for the eclipse-mosquitto https://hub.docker.com/_/eclipse-mosquitto/


see the result


沒有留言:

張貼留言