Yum is not working inside docker container!

0 votes

Hi Guys,

I launched one CentOS container. But I am not able to ping google with name and also not able to run yum command inside docker container.

How can I solve this problem?

Apr 22 in Docker by akhtar
• 17,950 points
888 views

1 answer to this question.

0 votes

Hi@akhtar,

Sometime dns is not able to resolve network problem in the containers. To avoid this follow the below given steps.

$ firewall-cmd --zone=public --add-masquerade --permanent
$ firewall-cmd --zone=public --add-port=80/tcp
$ firewall-cmd --zone=public --add-port=443/tcp

After setting port no, you have to reload firewall in your system

$ firewall-cmd --reload

Now try to start your docker and launch one container. It will work.

answered Apr 22 by MD
• 41,660 points

Related Questions In Docker

+1 vote
4 answers

COPY is not working in Docker

I had the exact same issue. I ...READ MORE

answered May 6, 2019 in Docker by Emilia
6,508 views
0 votes
1 answer

Docker ports are working on the localhost but not with public ip

Probably, the reason is that you've included ...READ MORE

answered Jun 12, 2018 in Docker by Damon Salvatore
• 5,540 points

edited Oct 15, 2018 by Kalgi 922 views
0 votes
1 answer

Different file owner inside Docker container and in host machine Ask

Filesystems, at least in Unix- and Linux-like ...READ MORE

answered Jun 25, 2018 in Docker by Damon Salvatore
• 5,540 points
177 views
0 votes
1 answer

Different file owner inside Docker container and in host machine

Here is what you can try. Since ...READ MORE

answered Jun 27, 2018 in Docker by Atul
• 10,240 points
624 views
0 votes
1 answer
0 votes
2 answers
0 votes
1 answer

run script shell inside docker app and mongodb container not working?

Hi, I think this error occurs because you ...READ MORE

answered Mar 9 in Docker by MD
• 41,660 points
732 views
0 votes
1 answer

Is my data stored permanently inside docker container?

Hi@akhtar, Yes, whatever you stored inside docker container ...READ MORE

answered Apr 6 in Docker by MD
• 41,660 points
49 views