Why do I need "--expose" option in Docker?
<p>I am confused about the "--expose" option in Docker, I do not know what it will actually do.</p>

<p>When I specify it (e.g., --expose=1234) in "docker run ...", where will the port will be EXPOSED? I do not think I can access the port in the host, if I want that, I think what I need is "-p", so what "--expose" will actually do?</p>

<p>I think if I want to access a container port from the host, what I need is, let the service in the container listen on the port, use "-p" option in "docker run" to publish the port on the host. Or in this case, I still have to use "--expose" to expose the port?</p>