1 # Dockerfile for image with ONAP applications:
2 # Portal app, Portal-SDK app, Portal-DBC app.
4 # Yields an image 823 MB
5 FROM frolvlad/alpine-oraclejdk8:slim
6 # Yields an image 1.4 GB
9 # Arguments are supplied by build.sh script
10 # the defaults below only support testing
11 ARG PORTAL_WAR=build/ecompportal-be-os.war
12 ARG FE_DIR=build/public
13 ARG SDK_WAR=build/epsdk-app-os.war
14 ARG DBC_WAR=build/dmaap-bc-app-os.war
18 # Just variables, never passed in
19 ARG TOMCAT=apache-tomcat-8.0.37
20 ARG TOMCATTAR=${TOMCAT}.tar.gz
21 ARG TOMCATHOME=/opt/${TOMCAT}
23 ENV http_proxy $HTTP_PROXY
24 ENV https_proxy $HTTPS_PROXY
25 RUN if [ ! -z ${HTTP_PROXY} ]; then echo "Acquire::http::proxy \"${HTTP_PROXY}\";" >> /etc/apt/apt.conf; fi && \
26 if [ ! -z ${HTTPS_PROXY} ]; then echo "Acquire::https::proxy \"${HTTPS_PROXY}\";" >> /etc/apt/apt.conf; fi
28 # Install Tomcat. This image already has curl.
30 RUN wget -q http://archive.apache.org/dist/tomcat/tomcat-8/v8.0.37/bin/apache-tomcat-8.0.37.tar.gz
31 RUN tar -xzf ${TOMCATTAR}
33 # Remove manager and sample apps
34 RUN rm -fr ${TOMCAT}/webapps/[a-z]*
38 WORKDIR ${TOMCATHOME}/webapps
39 RUN mkdir ECOMPPORTAL && mkdir ECOMPSDKAPP && mkdir ECOMPDBCAPP
41 # Portal has many parts
42 COPY $PORTAL_WAR ECOMPPORTAL
43 RUN cd ECOMPPORTAL && unzip -q *.war && rm *.war
44 COPY ${FE_DIR} ECOMPPORTAL/public
46 # SDK app has only a war
47 COPY $SDK_WAR ECOMPSDKAPP
48 RUN cd ECOMPSDKAPP && unzip -q *.war && rm *.war
50 # DBC app has only a war
51 COPY $DBC_WAR ECOMPDBCAPP
52 RUN cd ECOMPDBCAPP && unzip -q *.war && rm *.war
54 VOLUME ${TOMCATHOME}/logs
59 # Define commonly used ENV variables
60 ENV PATH $PATH:$JAVA_HOME/bin:${TOMCATHOME}/bin
61 # Install the wait script
63 # Install the launch script
64 COPY start-apps-cmd.sh /
66 # Define default command
67 CMD /start-apps-cmd.sh