我们在我们公司使用自定义 yum 存储库。有些事情导致他们无法执行yum makecache命令。
我在CentOS Linux release 7.7.1908 (Core)。
这是我们运行时得到的错误yum makecache:
One of the configured repositories failed (Unknown),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this
Run Code Online (Sandbox Code Playgroud)
回购看起来像这样,我需要同时使用它们。
埃佩尔回购:
[epel]
name=Extra Packages for Enterprise Linux 7 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch
metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
[epel-debuginfo]
name=Extra Packages for Enterprise Linux 7 - $basearch …Run Code Online (Sandbox Code Playgroud) 这是我的Dockerfile
FROM javamachine_0.1.2
MAINTAINER Meiram
RUN /report/report.sh start
ENV LANG C.UTF-8 ENV LANGUAGE C.UTF-8 ENV LC_ALL C.UTF-8
RUN echo "nameserver 192.168.1.100" > /etc/resolv.conf
COPY resolv.conf /etc/resolv.conf
EXPOSE 9090
Run Code Online (Sandbox Code Playgroud)
在创建容器指令docker run时,-dns也不会更改/etc/resolv.conf中的条目
如何永久更改/etc/resolv.conf中的条目?