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?

  • Docker linux: How to start multiple console/terminals for one running container?
  • Docker images on different docker versions
  • Run copied file in container
  • connect to container using ssh after adding new user and installing ssh
  • Where pulled images of docker are stored in Windows?
  • Docker container port unreachable after Docker host static ip changed
  • Docker stats for docker containers in kubernetes returning empty values
  • can't connect to docker container from outside
  • Create docker image from existing virtual machine
  • Customise apache.conf - set Timeout
  • How to select Docker host to use with new Eclipse Liberty WDT tools
  • How make a cluster of CoreOS on my local infrastructure?
  • 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.