docker [Errno 14] curl#6 - “无法解析主机:repo.svc.yyyyyy.com;未知错误”docker 无法从 vpnanyconnect访问互联网

问题描述

我正在从 vpn 内部在 ubuntu 20.10 中运行 docker 以运行 java 项目(使用 maven 构建),但是一段时间后我收到此错误,是否与 vpn 或其他任何相关?,我已经检查过 docker 是系统安装成功。我需要编辑任何系统文件才能正常运行吗?

aaaaaaa@bbbbbbb-MS-7C79:~/Project/docker$ sudo ./docker-run.sh 
Building xxxxxx-redis
Step 1/4 : FROM xxxxxx.yyyyyy.com/docker-virtual/redis:5
 ---> 68ac78a2f5b6
Step 2/4 : MAINTAINER Abcde R&D
 ---> Using cache
 ---> 3fca3767ef3b
Step 3/4 : copY redis.conf /usr/local/etc/redis/redis.conf
 ---> Using cache
 ---> b46001ae8867
Step 4/4 : CMD [ "redis-server","/usr/local/etc/redis/redis.conf" ]
 ---> Using cache
 ---> e51ba988b1fc
Successfully built e51ba988b1fc
Successfully tagged docker_xxxxxx-redis:latest
Building xxxxxx-av-gateway
Step 1/11 : FROM xxxxxx.yyyyyy.com/docker-virtual/centos:7
 ---> 8652b9f0cb4c
Step 2/11 : MAINTAINER Abcde R&D
 ---> Using cache
 ---> 0631b4be5909
Step 3/11 : ADD xxxxxx.repo /etc/yum.repos.d/
 ---> Using cache
 ---> 5a0d9bffeebd
Step 4/11 : RUN yum install -y epel-release
 ---> Running in 768276ed9519
Loaded plugins: fastestmirror,ovl
Determining fastest mirrors
 * base: mirrors.piconets.webwerks.in
 * extras: mirrors.piconets.webwerks.in
 * updates: centos.mirror.snu.edu.in
https://repo.svc.yyyyyy.com/yum/xxxxxx-rnd/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: repo.svc.yyyyyy.com; UnkNown error"
Trying other mirror.


 One of the configured repositories Failed (xxxxxx),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:

     1. Contact the upstream for the repository and get them to fix the problem.

     2. Reconfigure the baseurl/etc. for the repository,to point to a working
        upstream. This is most often useful if you are using a newer
        distribution release than is supported by the repository (and the
        packages for the prevIoUs distribution release still work).

     3. Run the command with the repository temporarily disabled
            yum --disablerepo=xxxxxx ...

     4. disable the repository permanently,so yum won't use it by default. Yum
        will then just ignore the repository until you permanently enable it
        again or use --enablerepo for temporary usage:

            yum-config-manager --disable xxxxxx
        or
            subscription-manager repos --disable=xxxxxx

     5. Configure the failing repository to be skipped,if it is unavailable.
        Note that yum will try to contact the repo. when it runs most commands,so will have to try and fail each time (and thus. yum will be be much
        slower). If it is a very temporary problem though,this is often a nice
        compromise:

            yum-config-manager --save --setopt=xxxxxx.skip_if_unavailable=true

failure: repodata/repomd.xml from xxxxxx: [Errno 256] No more mirrors to try.
https://repo.svc.yyyyyy.com/yum/xxxxxx-rnd/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: repo.svc.yyyyyy.com; UnkNown error"
ERROR: Service 'xxxxxx-av-gateway' Failed to build: The command '/bin/sh -c yum install -y epel-release' returned a non-zero code: 1

解决方法

在我安装 OpenConnect SSL VPN 客户端 (from this link) 并使用它而不是 anyconnect 后,此问题解决了,现在 docker 运行成功,现在即使我使用 anyconnect 运行 docker,它也能正常运行。

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...