Docker Community Forums

Share and learn in the Docker community.

Want to see my app container in local host

swarm
docker

(Skchowdhuri) #1

Hi,
I have created a Swarm-Worker and that includes spring-boot app container but their port is 8080/tcp but I want to show the app in localhost with any port. Like if I browse any link like

localhost:8080

It should show the app of that container.

Note: The machine is worker machine not manager.

Thanks,
skchowdhuri


(Lifeisfoo) #2

You need to publish the port using the docker service command. Otherwise, if you’re deploying your services with a compose file, you can declare the published ports directly from that file.