EXPOSE <port> [<port>...]
The
EXPOSEinstruction informs Docker that the container listens on the specified network ports at runtime.EXPOSEdoes not make the ports of the container accessible to the host. To do that, you must use either the-pflag to publish a range of ports or the-Pflag to publish all of the exposed ports. You can expose one port number and publish it externally under another number.
Inside your Dockerfile:
EXPOSE 8765
To access this port from the host machine, include this argument in your docker run command:
-p 8765:8765