Home  >  Article  >  Operation and Maintenance  >  What to do if yum cannot be used in docker

What to do if yum cannot be used in docker

王林
王林Original
2020-03-24 10:36:265274browse

What to do if yum cannot be used in docker

Problem:

Dockerfile reports that yum cannot be used, as shown in the figure:

What to do if yum cannot be used in docker

Solution:

vim /etc/sysctl.conf
net.ipv4.ip_forward=1   ##添加路由转发

Or:

vim /usr/lib/sysctl.d/00-system.conf
net.ipv4.ip_forward=1

Restart the network card and test again.

Recommended related tutorials: docker tutorial

The above is the detailed content of What to do if yum cannot be used in docker. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn