Want to see my app container in local host

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

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.