C
C
cyberlain2021-03-21 21:26:11
linux
cyberlain, 2021-03-21 21:26:11

How to open an application from docker on the external web without specifying a port?

There is a site in a docker container, which can now be viewed at site.ru:8080
On which port should the container be restarted so that it becomes available without specifying 8080 in the address bar? Perhaps you can somehow edit hosts on Linux, so the question is addressed to Linuxoids as well.

60578fba9173a396497619.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Sokolov, 2021-03-21
@sergiks

On the 80th. To open http://
via HTTPS, you need to obtain a certificate for the domain and start a web server, for example, NGINX or Apache, which will accept incoming connections and redirect them internally to port 8080.

A
Alexey Dmitriev, 2021-03-22
@SignFinder

It is better to use a reverse proxy, like nginx or ready-made https://github.com/nginx-proxy/nginx-proxy
for such cases. Docker has its own internal subnet and let containers stay on it and on their ports.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question