X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=deliveries%2FDockerfile.portalapps;h=f15265978e6a592937d3fd1a325e812cfe94cd69;hb=55bac427b18a6e37d6b09c4899b19b31cfa3d614;hp=3e295e8f7453e3321aade40d1963debf4b57dd69;hpb=a9627f8c54b7e9d5712320621e8a0b748ad9baf4;p=portal.git diff --git a/deliveries/Dockerfile.portalapps b/deliveries/Dockerfile.portalapps index 3e295e8f..f1526597 100644 --- a/deliveries/Dockerfile.portalapps +++ b/deliveries/Dockerfile.portalapps @@ -1,35 +1,41 @@ # Dockerfile for image with ONAP applications: -# Portal app, Portal-SDK app, Portal-DBC app. +# Portal app, Portal-SDK app. -FROM openjdk:8-jdk +# Yields an image 823 MB +FROM frolvlad/alpine-oraclejdk8:slim +# Yields an image 1.4 GB +# FROM openjdk:8-jdk # Arguments are supplied by build.sh script # the defaults below only support testing ARG PORTAL_WAR=build/ecompportal-be-os.war ARG FE_DIR=build/public ARG SDK_WAR=build/epsdk-app-os.war -ARG DBC_WAR=build/dmaap-bc-app-os.war ARG HTTP_PROXY ARG HTTPS_PROXY -# This is just a variable, never passed in -ARG TOMCATHOME=/opt/apache-tomcat-8.0.37 +# Just variables, never passed in +ARG TOMCAT=apache-tomcat-8.0.37 +ARG TOMCATTAR=${TOMCAT}.tar.gz +ARG TOMCATHOME=/opt/${TOMCAT} ENV http_proxy $HTTP_PROXY ENV https_proxy $HTTPS_PROXY RUN if [ ! -z ${HTTP_PROXY} ]; then echo "Acquire::http::proxy \"${HTTP_PROXY}\";" >> /etc/apt/apt.conf; fi && \ if [ ! -z ${HTTPS_PROXY} ]; then echo "Acquire::https::proxy \"${HTTPS_PROXY}\";" >> /etc/apt/apt.conf; fi -# Install Tomcat; curl is already part of this image +# Install Tomcat. This image already has curl. WORKDIR /tmp -RUN curl -s -O https://archive.apache.org/dist/tomcat/tomcat-8/v8.0.37/bin/apache-tomcat-8.0.37.tar.gz -RUN tar -xzf apache-tomcat-8.0.37.tar.gz +RUN wget -q http://archive.apache.org/dist/tomcat/tomcat-8/v8.0.37/bin/apache-tomcat-8.0.37.tar.gz +RUN tar -xzf ${TOMCATTAR} +RUN rm ${TOMCATTAR} # Remove manager and sample apps -RUN rm -fr apache-tomcat-8.0.37/webapps/[a-z]* -RUN mv apache-tomcat-8.0.37 /opt +RUN rm -fr ${TOMCAT}/webapps/[a-z]* +RUN mkdir -p /opt +RUN mv ${TOMCAT} /opt WORKDIR ${TOMCATHOME}/webapps -RUN mkdir ECOMPPORTAL && mkdir ECOMPSDKAPP && mkdir ECOMPDBCAPP +RUN mkdir ECOMPPORTAL && mkdir ECOMPSDKAPP # Portal has many parts COPY $PORTAL_WAR ECOMPPORTAL @@ -40,15 +46,17 @@ COPY ${FE_DIR} ECOMPPORTAL/public COPY $SDK_WAR ECOMPSDKAPP RUN cd ECOMPSDKAPP && unzip -q *.war && rm *.war -# DBC app has only a war -COPY $DBC_WAR ECOMPDBCAPP -RUN cd ECOMPDBCAPP && unzip -q *.war && rm *.war - VOLUME ${TOMCATHOME}/logs +# Switch back to root +WORKDIR / + # Define commonly used ENV variables ENV PATH $PATH:$JAVA_HOME/bin:${TOMCATHOME}/bin -COPY configure-and-run.sh / +# Install the wait script +COPY wait-for.sh / +# Install the launch script +COPY start-apps-cmd.sh / -# Define default command. -CMD ["/configure-and-run.sh"] +# Define default command +CMD /start-apps-cmd.sh