CentOS7 vault.centos.org 报错
|
|
|
|
查看状态
|
|
This error means that the cron service has been intentionally disabled (“masked”) on your system. When a service is masked, it cannot be started, even manually.
为了在 Docker 中使用指定 DNS,我们需要相应修改 /etc/resolv.conf。现在遇到的问题是
无法在 Dockerfile 里“永久”覆盖 /etc/resolv.conf; 无论 Classic 还是 BuildKit,Docker 都会在启动阶段把运行时生成的 resolv.conf 挂到容器里,覆盖镜像中原有内容。
因此,我们需要在 build 阶段,把 DNS 「传送」到 docker 里面。下面介绍具体的方法。