问题描述
我正在 openshift origin 1.3 中运行 spring boot 1.4.3 应用程序.
I'm running a spring boot 1.4.3 app in openshift origin 1.3.
带spring boot需要20多分钟.
It takes more than 20 minutes to bring spring bootup.
我使用的 docker 基础容器是带有 opendk8-jre 的 alpine:3.4.
the docker base container I'm using is alpine:3.4 with opendk8-jre.
spring boot 嵌入式容器使用默认的 tomcat 一个.我已经安装了 hasged 并设置了 -Djava.security.egd=file:/dev/./urandom
the spring boot embedded container is using default tomcat one. I've installed the haveged and set -Djava.security.egd=file:/dev/./urandom
但是如果我使用 docker run 运行图像本身(我没有使用 openshift),它可以启动..
but if I run the image itself with docker run(I'm not using openshift), it can start up..
知道为什么吗?
推荐答案
会不会是你没有设置 maven 代理,正在下载所有依赖项?
Could it be the case that you don't have a maven proxy setup and are downloading all dependencies?
如果是这种情况,您的日志可能会显示您一遍又一遍地下载相同的 deps.
If it's the case your logs likely show that you are donwloading the same deps over and over.
运行此命令以查看日志:
run this command to see the logs:
oc logs _POD_NAME_
此外,您是否在 OpenShift Dev Preview 中尝试过相同的操作并得到类似的结果?
Also, have you tried the same in OpenShift Dev Preview and got similar results?
这篇关于spring boot 需要永远在 Openshift 中启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!