node-red / node-red/node-red.github.io
Linking containers example not working any more
还没有人认领这个 Issue。
- 主要语言
- JavaScript
- 星标
- 118
- 派生
- 161
- 平均合并
- 8 小时 18 分钟
- 30 天内合并 PR
- 4
描述
In the section about linking containers the example to link mosquitto by a bridge network dosn't work with mosquitto:latest (2.0.7), but with the last 1.6.13 seams that the config file of Mosquitto 2 is different and not listening to the network by default.
If I look into the container log I get:
1614083867: mosquitto version 2.0.7 starting
1614083867: Config loaded from /mosquitto/config/mosquitto.conf.
1614083867: Starting in local only mode. Connections will only be possible from clients running on this machine.
1614083867: Create a configuration file which defines a listener to allow remote access.
1614083867: Opening ipv4 listen socket on port 1883.
1614083867: Opening ipv6 listen socket on port 1883.
1614083867: Error: Address not available
1614083867: mosquitto version 2.0.7 running
by altering the docker command to:
docker run -itd --network iot --name mybroker eclipse-mosquitto:1.6.13
it works like expected. So two solutions:
- using the command like above with the last 1.6 Mosquitto
- Providing an docker image with adapted mosquitto.conf file to enable
listener 1883andallow_anonymous trueto have the same behavior for the latest mosquitto.
Dockerfile could look like:
FROM eclipse-mosquitto:latest
RUN echo "listener 1883" >> /mosquitto/config/mosquitto.conf
&& echo "allow_anonymous true" >> /mosquitto/config/mosquitto.confVOLUME ["/mosquitto/data", "/mosquitto/log"]
EXPOSE 1883
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["/usr/sbin/mosquitto", "-c", "/mosquitto/config/mosquitto.conf"]
Best Christian
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 Docker 入门文档中的“linking containers”部分开始,使用当前镜像复现其中的 Mosquitto 示例。将结果与 Mosquitto 1.6.13 以及报告的 listener 配置进行比较。当文档中的示例能够在受支持的 Mosquitto 版本上运行,并且明确包含任何必需的配置或版本固定时,即视为完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- docker
- 领域
- devops, documentation
- Issue 类型
- 文档
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 42/100