Expose all ports for a Docker image

When running using --network host there is no need to map the ports. All the docker container ports will be available since the network host mode makes the container use the host’s network stack.

Also the EXPOSE 8080 61616 5672 61613 5445 1883 is not needed. This instruction doesn’t do anything. It is just a way to document which ports need to be mapped.

In short, running docker run --network host ... will expose all the container ports.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)