Linux - ContainersThis forum is for the discussion of all topics relating to Linux containers. Docker, LXC, LXD, runC, containerd, CoreOS, Kubernetes, Mesos, rkt, and all other Linux container platforms are welcome.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Name resolution is not set up correctly in the container.
Check /etc/resolv.conf and fix it so that it points to a nameserver to which you have connectivity. For details, read Red Hat documentation.
EDIT: Oops, I misunderstood you. The container can't be running Centos, so disregard the documentation link. You need to follow instructions for the distro that runs in the container. Or perhaps the container is not supposed to be updated. Perhaps you should also read documentation pertaining to this particular container.
Last edited by berndbausch; 03-17-2020 at 02:43 AM.
Could you please advise why the container can't be running in CentOS?
I have installed docker and pulled the httpd image in CentOS
Moreover I have tried the same in GCP cloud and it is working as expected.
My doubt is, do we need to change anything in the VMWare end or in the OS end?
I did not say that the container can't run in Centos.
I said that it can't be running Centos, since Centos doesn't use apt, and doesn't name the web server "apache2".
I also said that the name resolution in this container doesn't work. This is where you should start your troubleshooting.
The name resolution doesn't work. Which DNS server is configured in the container?
It may work in GCP because the container gets the correct nameserver from DHCP. The problem in your VMware environment may be due to an incorrect or no DNS server sent by DHCP.
The nameserver is defined in /etc/resolv.conf or recently /etc/systemd/systemd-resoled.conf (from memory).
Please note, I have installed Ubuntu variant and tried to do the same, it is working as expected.
The OS details of the container and resolv.conf file are same.
The only different is the base OS is Ubuntu instead of CentOS in VMWare.
I'm facing the same issue in real time as we are using the Linux OS in VMWare.
From what you say, it seems that 192.168.221.2 is correct. Perhaps the container has no connectivity to this address?
It's your job to find out why name resolution fails. The DNS server doesn't resolve deb.debian.org, or it doesn't exist, or it is not accessible, or perhaps there are other reasons.
Perhaps name resolution works now and it did not work for a limited time.
Last edited by berndbausch; 03-19-2020 at 06:07 AM.
It's your job to find out why name resolution fails
Actually im new to Dockers and containers and facing the issue.
I tied my best to find the resolution but nothing works, that's why i requested help here.
I don't know if it has anything to do with Docker. First rule out that it is a network problem independent of Docker:
Is there basic connectivity to the nameserver?
Do programs like nslookup resolve the name using the nameserver?
Are you successful with a different nameserver?
Can you resolve deb.debian.org using this nameserver?
- from within the container
- from the Centos VM that runs the container
- from the Windows host that runs the Centos VM
?
I don't know if it has anything to do with Docker. First rule out that it is a network problem independent of Docker:
Is there basic connectivity to the nameserver?
Do programs like nslookup resolve the name using the nameserver?
Are you successful with a different nameserver?
You have confirmed that there is basic connectivity. Not yet the two other questions.
As i said earlier, i have tried all the possible ways to resolve the deb.debian.org error.
I have updated the /etc/resolv.conf by entering "namesever 8.8.8.8" and "nameserver 192.168.221.1", but nothing works.
My laptop is running on Windows 8.1
I have installed VMWare 14 version and installed CentOS 8
In CentOS i have installed the docker and container for my learning.
Code:
[docker@dockernongui ~]$ curl deb.debian.org
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE>Welcome to deb.debian.org (fastly instance)!</TITLE>
</HEAD>
<BODY>
<H1>Welcome to deb.debian.org (fastly instance)!</H1>
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.