Docker and Spring boot: how to hide port from url?

I try to deploy my Spring Boot on DigitalOcean. I built docker image and run it on server and everything is fine (docker run -p 8080:8080 hub_user/docker_image). I have my own domain and ip address (access url to my application is But how I can hide port number from url to access my application? How I can use my domain without port 8080?

  • How to import my db dump into mariadb on start?
  • Why is my dockerfile not copying directories
  • Firefox in a docker container accessible from selenium in another
  • How can I change the docker id and name
  • Vagrant env variable to Docker build
  • Viewing all run parameters of a docker container
  • Best Docker logging architecture using ELK stack
  • How to expose a service running inside a docker container, bound to localhost
  • Automated pulling from gitolite repo within docker container
  • Deploying Java webapp to Tomcat 8 running in Docker container
  • How can I fix 'No space left on device' error in Docker?
  • docker commit apache container to image brings trouble
  • 2 Solutions collect form web for “Docker and Spring boot: how to hide port from url?”

    If you are using http, what I suppose, the default port is the 80. So if you write is equivalent to

    docker run -p 80:8080 hub_user/docker_image

    This isn’t really a docker question per se. As AxelWass says, port 80 is the default port that HTTP uses (browsers automatically try and go here when you visit your site Your application is actually running inside the container on port 8080, so if you just map 8080:8080 then docker will forward traffic coming to your host on port 8080 (the first one) to 8080 (the second one) inside your container.

    Now, if you want traffic coming to the server on port 80 (which all web traffic will by default) to be forwarded to your container, you need to map it like 80:8080.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.