How publish container of docker to be accessible?

  docker, localhost, spring-boot

I have a spring boot project I successfully built and run an image with the container by docker desktop, then I push it to my repository with port 8080:9090 and it works in the localhost "http://localhost:9090/message", now I try to publish it to be accessible outside the localhost, how can do that? thanks in advance.

Source: Docker Questions