从Docker容器启动WAS 8.5应用程序服务器时出现502错误的网关错误

我有一个Docker镜像,它安装了修订包的WAS 8.5(Developer Edition)。

现在我创build并启动我的Docker容器(was8cont),暴露了几个公共端口。

现在,当我使用命令启动App Server时,

docker exec was8cont /opt/IBM/WebSphere/AppServer/bin/startServer.sh server1

我得到错误

 Error response from daemon: 502 Bad Gateway -- nginx 

我有容器内存2GB。

我的Docker文件是:

 From ubuntu:14.04 MAINTAINER Nandakumar Kuthalaraja <n.kuthalaraja@perficient.com> RUN apt-get install -y unzip ################ Installation manager ############## #Install Installation Manager COPY agent.installer.linux.gtk.x86_64_1.8.3000.20150606_0047.zip /tmp/ RUN mkdir /tmp/im && unzip -qd /tmp/im /tmp/agent*.zip \ && /tmp/im/installc -acceptLicense -accessRights admin \ -installationDirectory "/opt/IBM/InstallationManager" \ -dataLocation "/var/ibm/InstallationManager" -showProgress \ && rm -fr /tmp/agent*.zip /tmp/im #Install IBM WAS v8 --com.ibm.websphere.BASE.v85 COPY WAS_V8_1_OF_3.zip /tmp/ COPY WAS_V8_2_OF_3.zip /tmp/ COPY WAS_V8_3_OF_3.zip /tmp/ RUN mkdir /tmp/was && unzip -qd /tmp/was /tmp/WAS_V8_1_OF_3.zip \ && unzip -qd /tmp/was /tmp/WAS_V8_2_OF_3.zip \ && unzip -qd /tmp/was /tmp/WAS_V8_3_OF_3.zip \ && /opt/IBM/InstallationManager/eclipse/tools/imcl -showProgress \ -acceptLicense install com.ibm.websphere.DEVELOPERSILAN.v85 \ -repositories /tmp/was/repository.config \ -installationDirectory /opt/IBM/WebSphere/AppServer \ && rm -fr /tmp/was /tmp/WAS_V8_1_OF_3.zip \ /tmp/WAS_V8_2_OF_3.zip /tmp/WAS_V8_3_OF_3.zip # Install fixpack COPY 8.5.5-WS-WAS-FP0000005-part1.zip /tmp/ COPY 8.5.5-WS-WAS-FP0000005-part2.zip /tmp/ RUN mkdir /tmp/wasfp \ && unzip -qd /tmp/wasfp /tmp/8.5.5-WS-WAS-FP0000005-part1.zip \ && rm -fr /tmp/8.5.5-WS-WAS-FP0000005-part1.zip \ && unzip -qd /tmp/wasfp /tmp/8.5.5-WS-WAS-FP0000005-part2.zip \ && rm -fr /tmp/8.5.5-WS-WAS-FP0000005-part2.zip \ && /opt/IBM/InstallationManager/eclipse/tools/imcl -showProgress \ -acceptLicense install com.ibm.websphere.DEVELOPERSILAN.v85 \ -repositories /tmp/wasfp/repository.config \ -installationDirectory /opt/IBM/WebSphere/AppServer \ && rm -fr /tmp/wasfp # Create AppServer Profile RUN /opt/IBM/WebSphere/AppServer/bin/manageprofiles.sh -create -templatePath /opt/IBM/WebSphere/AppServer/profileTemplates/default/ -profileName AppSrv01 -profilePath /opt/IBM/WebSphere/AppServer/profiles/AppSrv01 EXPOSE 2809 9402 9403 9353 9633 9100 11004 11003 9401 7276 7286 5558 5578 5060 5061 9943 9080 9043 9060 8880 

你可能想看看我们最近提供的WAS经典Dockerfiles: https : //github.com/WASdev/ci.docker.websphere-classic

在这个例子中你会看到我们启动服务器作为运行容器时执行的命令的一部分,而不是必须使用单独的exec。 如果您按照以下步骤操作,则还应该获得相当小的图像。