I'm trying to setup mqtt broker in a Docker container. I pulled the following Docker image (https://hub.docker.com/_/eclipse-mosquitto) on my machine and I can successfully launch the Docker container with the following command:
docker run -it -p 1883:1883 -p 9001:9001 --network=host eclipse-mosquitto
If I run it with that command I get the following output:
WARNING: Published ports are discarded when using host network mode
1616081533: mosquitto version 2.0.9 starting
1616081533: Config loaded from /mosquitto/config/mosquitto.conf.
1616081533: Starting in local only mode. Connections will only be possible from clients running on this machine.
1616081533: Create a configuration file which defines a listener to allow remote access.
1616081533: Opening ipv4 listen socket on port 1883.
1616081533: Opening ipv6 listen socket on port 1883.
1616081533: mosquitto version 2.0.9 running
So then I start Mqttfx and I set up a connection to 127.0.0.1 and port 1883 but the MQTT client is unable to connect to my broker. What am I doing wrong?