FROM python:3.8-slim # Install Mosquitto to act as the MQTT broker RUN apt-get update && \ apt-get install -y mosquitto mosquitto-clients # Expose MQTT port EXPOSE 1883 COPY mosquitto.conf /mosquitto.conf # Run Mosquitto and the Python MQTT client CMD mosquitto -c /mosquitto.conf