相关疑难解决方法(0)

Docker Ubuntu背后的代理

查看文档,没有关于如何在代理后面运行它的说明. https://docs.docker.com/installation/ubuntulinux/

在论坛上阅读,指令是更新/ etc/default/docker以导出代理设置.

 export http_proxy="http://127.0.0.1:3128/"
 export https_proxy="http://127.0.0.1:3128/"
 export HTTP_PROXY="http://127.0.0.1:3128/"
 export HTTPS_PROXY="http://127.0.0.1:3128/"
Run Code Online (Sandbox Code Playgroud)

然后我们重启/启动docker

 sudo service docker start
Run Code Online (Sandbox Code Playgroud)

在容器内部,如果我运行'apt-get',npm install,bower install我无法通过代理.

不知道我错过了什么.

docker

38
推荐指数
4
解决办法
5万
查看次数

如何让Docker在公司防火墙后面的Windows系统上运行?

我正在尝试按照本教程安装一个有效的docker-installation:http: //docs.docker.io/en/latest/installation/windows/

到目前为止,我使用手动下载的存储库运行VM(遵循github-link并下载为zip,因为"git clone"在我的公司代理后面没有工作,即使在使用"git conf --global http"设置代理之后也是如此.proxy ..." - 它一直要求我进行身份验证407,尽管我输入了我的用户和PW).现在我处于我应该使用"docker run busybox echo hello world"的状态("运行Docker"部分).当我这样做时,我首先得知没有安装docker(如教程底部所示),然后,在我用apt-get install docker获取它后,我得到"Segmentation Fault或遇到的严重错误.核心和流产."

现在做什么?这是因为我没有使用git clone或者docker安装有问题吗?我在某处读到,apt-get install docker没有安装我想要的docker,但是有些GNOME-Tool,我可以指定我的apt-request来获得正确的工具吗?

windows git proxy docker

21
推荐指数
1
解决办法
2万
查看次数

Docker运行连接超时

在跑步的时候

sudo docker pull centos

它提供连接超时,当它在代理已经设置http_proxy和https_proxy的代理后面运行.除了代理之外的原因是什么,虽然看起来代理问题.我检查了LINK但是徒劳无功,还有其他一些设置我想念,请告诉我.

2014/11/10 23:31:53获取https://index.docker.io/v1/repositories/centos/images:拨打tcp 162.242.195.84:443:连接超时

docker boot2docker

9
推荐指数
2
解决办法
2万
查看次数

Windows 10中的Docker代理传播到容器无法正常工作

我支持在Windows 10上合作代理和运行docker.我已根据此处文档在 docker上设置代理.

我的docker代理设置

我能够提取图像,但这些代理设置不会传播到容器,例如当我运行alpine env时,它不会显示代理配置.以下是我的输出

? docker run alpine env                                          
  PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
  HOSTNAME=14fca5bee12f                                            
  HOME=/root                                                       
Run Code Online (Sandbox Code Playgroud)

以下是根据文档的预期输出.

检测输出

在构建以下docker文件时,我从alpine容器中获取连接错误

Docker版本

Docker version 17.12.0-ce, build c97c6d6
Run Code Online (Sandbox Code Playgroud)

DockerFile

FROM alpine:latest
ADD HelloWorld.class HelloWorld.class
RUN apk --update add openjdk8-jre
ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "HelloWorld"]
Run Code Online (Sandbox Code Playgroud)

错误

Step 3/4 : RUN apk --update add openjdk8-jre                                                                      
 ---> Running in 1205b24d5044                                                                                     
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz                                       
ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.7/main: could not connect to server (check repositories file)      
WARNING: Ignoring APKINDEX.70c88391.tar.gz: No such file or directory                                             
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz                                  
ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.7/community: could not connect to …
Run Code Online (Sandbox Code Playgroud)

proxy containers docker windows-10

9
推荐指数
1
解决办法
4527
查看次数

无法找到图像错误,如何设置代理下载图像

我需要设置公司代理,以便Docker可以从公共注册表下载图像.

$ sudo docker run hello-world 
Unable to find image 'hello-world:latest' locally 
Pulling repository docker.io/library/hello-world 
Error while pulling image: Get https://index.docker.io/v1/repositories/library/hello-world/images: dial tcp: lookup index.docker.io: no such host
Run Code Online (Sandbox Code Playgroud)

我正在使用Ubuntu 12.04机器.我找到了这个答案systemctl在Ubuntu 12.04中没有.我怎样才能做到这一点?

谢谢.

docker

7
推荐指数
1
解决办法
2万
查看次数

获取 https://registry-1.docker.io/v2/: net/http: 请求在等待连接时被取消(Client.Timeout exceeded while awaiting headers)

尝试构建 docker 映像时出现以下错误。我的操作系统是企业环境中的 CentOS 7。

Sending build context to Docker daemon  1.22GB
Step 1/20 : FROM centos
Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers).
Run Code Online (Sandbox Code Playgroud)

我遵循了我在网上得到的答案。(相关问题)。我以 24 票的方式跟随答案,因为它是为 CentOS 7 提供的

我在目录 /etc/sysconfig/ 中创建了一个名为 docker 的文件并添加了以下内容

HTTP_PROXY="http://proxy.example.com:80/"
HTTPS_PROXY="https://proxy.example.com:443/"
http_proxy="${HTTP_PROXY}"
https_proxy="${HTTPS_PROXY}"
Run Code Online (Sandbox Code Playgroud)

但我收到以下错误。

Sending build context to Docker daemon  1.22GB
Step 1/20 : FROM centos
Get https://registry-1.docker.io/v2/: http: error connecting to proxy https://proxy.example.com:443/: dial tcp: lookup proxy.example.com on 127.0.0.1:53: no such host
Run Code Online (Sandbox Code Playgroud)

我的 Docker …

docker docker-image docker-build

7
推荐指数
0
解决办法
6859
查看次数

无法在本地Docker中找到映像'hello-world:latest'

这是我第一次尝试设置docker(版本17.09.0-ce)。我已经按照官方网站上的所有说明进行操作,并且可以在我的计算机(Windows 10 x64)上正常运行。当我docker --version在控制台上键入return时Docker version 17.09.0-ce, build afdb6d4。但是我正在尝试执行docker run -t hello-world,这就是答案:

Unable to find image 'hello-world:latest' locally
docker: Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers).
See 'docker run --help'.
Run Code Online (Sandbox Code Playgroud)

我的互联网来自代理,但我制作了VPN,除docker以外,其他所有设备都正常运行,甚至使用pip安装python软件包。有什么问题吗?

docker

6
推荐指数
1
解决办法
6084
查看次数

在 Kubernetes 中创建 Pod 时出错

我已使用此处的说明在 Ubuntu 服务器中安装了 Kubernetes 。我正在尝试使用kubectl run hello-minikube --image=gcr.io/google_containers/echoserver:1.4 --hostport=8000 --port=8080示例中列出的方法创建 pod 。但是,当我这样做时,我kubectl get pod将容器的状态设为pending. 我进一步进行kubectl describe pod了调试,并看到了以下消息:

FailedScheduling pod (hello-minikube-3383150820-1r4f7) failed to fit in any node fit failure on node (minikubevm): PodFitsHostPorts.

我进一步尝试删除这个 pod,kubectl delete pod hello-minikube-3383150820-1r4f7 但是当我进一步删除时,kubectl get pod我看到另一个带有前缀“hello-minikube-3383150820-”的 pod,我还没有创建。有谁知道如何解决这个问题?先感谢您。

kubernetes google-kubernetes-engine

5
推荐指数
1
解决办法
2744
查看次数

将节点加入 docker swarm 失败

我在 Docker Swarm 中有两台服务器,但是当我需要添加第三台服务器时 - 我得到了结果:

来自守护进程的错误响应:rpc 错误:代码 = 14 desc = grpc:连接不可用

一个网络中的所有服务器。

可能是什么问题呢?

docker docker-swarm

4
推荐指数
1
解决办法
8753
查看次数

Kubernetes pod 未启动,在代理后面运行

我在 minikube 上运行 kubernetes,我在代理后面,所以我在 /etc/systemd/system/docker.service.d/http-proxy.conf 中为 docker 设置了 env 变量(HTTP_PROXY & NO_PROXY)。我能够做 docker pull 但是当我运行下面的例子时

kubectl run hello-minikube --image=gcr.io/google_containers/echoserver:1.4 --port=8080
kubectl expose deployment hello-minikube --type=NodePort
kubectl get pod
Run Code Online (Sandbox Code Playgroud)

pod 永远不会启动,我收到错误消息

desc = unable to pull sandbox image \"gcr.io/google_containers/pause-amd64:3.0\"

docker pull gcr.io/google_containers/echoserver:1.4 工作正常

docker kubernetes minikube

2
推荐指数
1
解决办法
4324
查看次数