我正在使用 DockerFile 创建一个 docker 映像。当我执行 docker build 命令时出现错误,以下是详细信息
docker build -f Dockerfile.app --no-cache --rm --label 'APS_INFO=OS/CentOS/7.6/-baseurl=http://repo.lab.pl.nikhil.com/centos-remote/7.7.1908/os/x86_64/-' --label BUILDTIME=2020-03-29T09:26:54+0530 --build-arg=BASE_IMAGE=nikhil/myrepo/linuximsbase:20.5_11-Mar-2020 --build-arg=IMAGE_BUILD=admincli -t nikhil/myrepo/admincli:latest -t nikhil/myrepo/admincli:_29-Mar-2020 .
(yum:77): libdnf-WARNING **: 03:57:29.180: Skipping refresh of base: cannot update repo 'base': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried; Last error: Curl error (28): Timeout was reached for http://repo.lab.pl.nikhil.com/centos-remote/7.7.1908/os/x86_64/repodata/repomd.xml [Connection timed out after 30001 milliseconds]
我已经使用 HTTP_PROXY 启动了 docker 服务
....
Environment="NO_PROXY=localhost,10.200.200.3,127.0.0.1"
Environment="HTTP_PROXY=http://10.158.100.6:8080/"
Environment="HTTPS_PROXY=https://10.158.100.6:8080/"
ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
....
您能否帮我创建 Docker 映像有什么问题。
注意:如果我在 barshrc 中设置相同的代理详细信息,我可以连接并下载 repodata 文件。