pushdeer/docker/mqtt/Dockerfile.dev

20 lines
402 B
Docker
Raw Normal View History

2022-02-23 17:50:40 +08:00
FROM node:16-alpine3.15
RUN apk --no-cache add mosquitto mosquitto-clients
RUN npm install -g forever
ADD mosquitto.conf /mosquitto.conf
RUN /usr/sbin/mosquitto -c /mosquitto.conf -d
# 测试时注释掉下一行
# COPY api /api
COPY init.sh /init.sh
RUN chmod +x /init.sh
EXPOSE 1883
EXPOSE 80
ENTRYPOINT ["/bin/sh", "/init.sh"]
# ENTRYPOINT ["/usr/sbin/mosquitto", "-c", "/mosquitto.conf",""]