Ip address without port not working

February 1, 2017 2.1k views

I run a docker container for my application. This is the command I used to get it worked:

docker run --name spring-boot -p 8080:8080 --link my-mysql-db:mysql -d username/image-name:latest

My application is up and running. I can navigate my app like this: but it is not working if I type only without port number. How can I fix that?

Thank in advance!

1 Answer
Woet February 1, 2017
Accepted Answer

Because port 80 is the port used for HTTP. You can change it or use a webserver and proxy the requests.

  • I don’t really get it. What do you mean by I can change it? I tried like this:

    docker run --name spring-boot -p 80:80 --link my-mysql-db:mysql -d username/image-name:latest

    Application starts up properly but I can’t navigate the page. It’s not working. This format: or does not opening the page.

  • Ok, I used like this and it worked.

    docker run --name spring-boot -p 80:8080 --link my-mysql-db:mysql -d username/image-name:latest


Have another answer? Share your knowledge.