Dockerfile - gradlew卡在下载上

时间:2016-03-14 09:54:22

标签: docker port virtual-machine

我正在使用此命令从Dockerfile构建Docker-image:

docker build -it /root/Documents/myDockerfiles/tomcat/.

Dockerfile如下所示:

[root@srv01 ~]# cat /root/Documents/myDockerfiles/tomcat/Dockerfile
FROM tomcat:8.0.32-jre8
MAINTAINER "John Doe <johndoe@dough.com>"
RUN apt-get update && apt-get install -y git
RUN git clone https://myusername:mypassword@mygiturl/mygroup/myproject.git
RUN cd ./myproject/ && ./gradlew war

所以它基本上将现有的git-repo,cds克隆到克隆的目录中,然后运行gradle包装器。

问题是gradle-wrapper似乎与外界无关,因为:

Step 5 : RUN cd ./myproject && ./gradlew war 
---> Running in d01b57b9f932 Downloading https://services.gradle.org/distributions/gradle-2.3-bin.zip 
(here its stuck, gradlw can't communicate to the outside)

我认为它必须是 防火墙和端口问题 ,因为当我从本地笔记本电脑执行相同操作时,它不会卡住,但是在我的 VM上执行某些Extranet-Cloud-Service (我无法提及其名称),它就会停在那里。

所以我的问题是:

1。)为什么会卡在那里?
2.)我该怎么做以防止它被卡在那里?

0 个答案:

没有答案