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安装教程(Ubuntu 傻瓜式安装)


下一篇:CentOS 7 安装 mosquitto