mosquitto on docker
Posted sunnykwan
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mosquitto on docker相关的知识,希望对你有一定的参考价值。
1.
docker pull eclipse-mosquitto
2.
mkdir
-p /mosquitto/config
mkdir
-p /mosquitto/data
mkdir
-p /mosquitto/log
3.
vi /mosquitto/config/mosquitto.conf
context:
persistence true
persistence_location /mosquitto/data
log_dest file /mosquitto/log/mosquitto.log
4.
chmod
-R 755 /mosquitto
chmod
-R 777 /mosquitto/log
5.
docker run -d --name=mosquitto --privileged
-p 1883:1883 -p 9001:9001
-v /mosquitto/config/mosquitto.conf:/mosquitto/config/mosquitto.conf
-v /mosquitto/data:/mosquitto/data
-v /mosquitto/log:/mosquitto/log
eclipse-mosquitto
以上是关于mosquitto on docker的主要内容,如果未能解决你的问题,请参考以下文章
mosquitto 1.4.14 不支持 Windows 中的 Web 套接字并且代码不起作用
[Codeforces Round #522 (Div. 2, based on Technocup 2019 Elimination Round 3)][C. Playing Piano](代码片段
翻译:如何在Ubuntu16.04上安装Mosquitto这个MQTT消息服务器并对其进行安全配置