I have a web application that runs on localhost:8080. I have put it in a Docker container, and want the port 8080 exposed on the host machine. The only way I can seem to get this port on the hosts localhost is with:
$ sudo docker run --network=host container_name
This of course displays the html page, however the applicaation also runs a redis server on port 6379. When I start docker this port is available on the host, however the application cannot access it from within docker.
How do I make only the port 8080 exposed to the host machine, and other ports available for the application.