Run webapplication using domain name not iP in docker container

Hi,

I need to run my web application with a domain name for a website not using IP. Host machine is already using Port 80 for apache and I want to run nginx on a container on the same host machine.

So I pull Ubuntu latest image and expose port 8081 on container using

docker run -itdp 8081:80 --name nginx-webserver ubuntu:latest

then using exec I got access to the container and install nginx, php-fpm and start nginx server.

Now I am able to access default page using

http://XX.XX.XX.XX:8081
http://XX.XX.XX.XX:80081/info.php

I I tried on my host where docker is installed
curl localhost:8081
I got web page

both are working but I am not able to use the domain name instead of IP.

anyone please help me.