Home > other >  How to configure the virtual domain name in the Docker
How to configure the virtual domain name in the Docker

Time:09-16

I'm in the Ubuntu system, running centos image, install PHP and Apache, through the host and port access, I modified the HTTPD conf and hosts file, want to configure virtual domains in docker, but can't access, even in the docker curl localhost can normal visit, I should how to configure the virtual domain name?

CodePudding user response:


Assume that your host machine is Linux,
Make sure the IP impassability, such as ping hosting IP 127.0.0.1, as well as 47.95.164.112 (IP) of CSDN
If no problem, then put the host in the/etc/resolv. Conf mapped to container, such as try,
Also, with the docker container inspect & lt; The container id> Check the type of network,

-- they say not to, for reference only.
  • Related