Domain name targets on my container

Hi everyone,
I am currently using Docker on an OVH VPS. I have a container which contains the ERPNext software, which is mapped to port 8080 on the VPS.

What I want is for my software to be accessible via my domain name.

Thank you in advance for helping me

This problem is neither caused, nor solved by docker.

Just configure the dns entry in the dns server where you manage the domain, and configure the dns entry to resolve the domain name to the ip of the host.

Ok thanks,I’m going to dig deeper into it, but it doesn’t accept the fact that it’s a different port than 80.

That’s right. DNS has nothing to do with ports, it just resolved a domain name to an IP.

When accessing your app, you need to specify the port in your URL, when it’s not default 80:

http://example.com:8080

You can also remap the external port of a Docker container with -p 80:8080 (or equivalent in compose).

Finally, it’s best practice to use a reverse proxy to run multiple services on one IP, it can also handle TLS termination, check nginx-proxy and simple Traefik example.