无法在minishift - OpenShift-Origin中访问正在运行的Docker War of War(with tomcat)的图像
我已经为一个简单的Java-Spring MVC War文件(Docker Config下面)打了一个docker镜像。我可以运行使用docker运行命令,也没有看到日志中的任何错误或者在Openshift-minishift中将攻击上载到内部注册表中。我可以在我的Openshift-minishift控制台中拉出图像。
I have crated a docker image for a simple Java-Spring MVC War file, (Docker Config below). I am able to run the using docker run command and also I do not see any errors in the log or trouble uploading war into internal registry in Openshift-minishift. I was able to pull the image in my Openshift-minishift console.
#Docker Config
FROM tomcat:8.0.20-jre8
MAINTAINER ashok.gudise@github
ENV CATALINA_HOME /usr/local/tomcat
ENV PATH $CATALINA_HOME/bin:$PATH
RUN mkdir -p "$CATALINA_HOME"
WORKDIR $CATALINA_HOME
RUN chgrp -R 0 $CATALINA_HOME
RUN chmod -R g+rw $CATALINA_HOME
RUN find $CATALINA_HOME -type d -exec chmod g+x {} +
#RUN mkdir $CATALINA_HOME/app_conf
#ADD config $CATALINA_HOME/app_conf/
COPY build/libs/distributed-app-1.0.war $CATALINA_HOME/webapps/
#RUN sed -i -e 's/^shared.loader=$/shared.loader="${catalina.base}\/app_conf"/' $CATALINA_HOME/conf/catalina.properties
EXPOSE 8080
CMD ["catalina.sh", "run"]
-
OC命令
-- OC Commands
oc new-project ext-project
oc login -u admin
oc policy add-role-to-user admin ashokgudise ext-project
oc adm policy add-scc-to-group anyuid system:authenticated
oc policy add-role-to-group system:image-puller system:serviceaccounts:extproject
docker login -u ashokgudise -p XXXXXXXX 111.11.111.11:5000
docker push 111.11.111.11:5000/ext-project/dock-img-app:latest
docker tag dist-app:1.0 111.11.111.11:5000/ext-project/dock-img-app:latest
我的pod的tomcat日志中没有看到任何异常的东西或异常,我也可以看到pod的终端爆炸式的战争。
I do not see any unusual thing or exceptions in my pod's tomcat logs,also I can see exploded war in the pod's terminal.
我无法运行应用程序生成路线
I could not able to run the app with generated route,
最后,我已经解决了我的问题,我看到了类似的问题,我在这里面临 https:// git hub.com/openshift/origin/issues/8702 。
Finally I have resolved my issue, I've seen similar kind of issue that I faced here https://github.com/openshift/origin/issues/8702 .
我的生成路由器的原因可能是缺少haproxy配置。
Reason could be missing haproxy config for my generated router.
所以我卸载了我的minishift,并使用 ansible-container
So I have uninstalled my minishift, and re-installed minishift using ansible-container
现在tomcat已经运行起来了!
Now tomcat is up and running!!!