码迷,mamicode.com
首页 > 其他好文 > 详细

mosquitto on docker

时间:2020-05-21 13:22:45      阅读:86      评论:0      收藏:0      [点我收藏+]

标签:mod   dock   index   docker   des   text   nta   docke   plain   

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

标签:mod   dock   index   docker   des   text   nta   docke   plain   

原文地址:https://www.cnblogs.com/sunnykwan/p/12930037.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!