I am trying to deploy a mosquitto MQTT broker in our corporate cloud through docker image. The allowed ports that are exposed are in the range of 10000-10999. By default eclipse-mosquitto image exposes port 1883. Is there a way to unexpose port 1883 and expose 10883? This is my Dockerfile :
EXPOSE instructions have a merly documentational character. Some management tools detect them and pre-populate them as target for port mappings settings when creating a container (e.g. like the Synology Docker-UI).
By itself the EXPOSE instruction has no effect on a container created from the image. Only published ports have
You can always change the mosquitto.conf port configuration to listen on 10883 instead of the default using the listener variable in that file. Then you can expose the port as mentioned.