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, 2020 in Docker by akhtar
• 38,260 points
6,292 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, 2020 by MD
• 95,460 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
22,361 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,980 points

edited Oct 15, 2018 by Kalgi 4,190 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,980 points
949 views
+2 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, 2020 in Docker by MD
• 95,460 points
5,269 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, 2020 in Docker by MD
• 95,460 points
1,209 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP