Docker Community Forums

Share and learn in the Docker community.

How to share the port 8080 between docker host and with container running on it, while port 8080 is getting used by docker host itself?

Not able to launch the apache configclient.html from container which is running on docker host. The point here is docker host on which container is running, is also using the port 8080 for running apache tomcat. So, now docker host and container running on host both using same port 8080. How can I make way here to achieve my way to run the apache on container and apache tomcat on host with out changing the port address?! . Please note here, I am using private network here. (ip ->192.168.xx.xx)

I really doubt that you can do this configuration without changing either one of the ports, I don’t see how two applications can share the same port

1 Like

@sergito23, Yeh, thanks for the reply.
Well for my current requirement, I have to move the application running on host to another container and use the user defined bridge network . It will enable the containers to have the same ports.