What to do if yum cannot be used in docker

王林
Release: 2020-03-24 10:36:26
Original
5378 people have browsed it

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
Copy after login
net.ipv4.ip_forward=1   ##添加路由转发
Copy after login

Or:

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

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template