Drop DMaaP BC web GUI from Portal deployment
[portal.git] / deliveries / Dockerfile.portalapps
1 # Dockerfile for image with ONAP applications:
2 # Portal app, Portal-SDK app.
3
4 # Yields an image 823 MB
5 FROM frolvlad/alpine-oraclejdk8:slim
6 # Yields an image 1.4 GB
7 # FROM openjdk:8-jdk
8
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 HTTP_PROXY
15 ARG HTTPS_PROXY
16
17 # Just variables, never passed in
18 ARG TOMCAT=apache-tomcat-8.0.37
19 ARG TOMCATTAR=${TOMCAT}.tar.gz
20 ARG TOMCATHOME=/opt/${TOMCAT}
21
22 ENV http_proxy $HTTP_PROXY
23 ENV https_proxy $HTTPS_PROXY
24 RUN if [ ! -z ${HTTP_PROXY} ]; then echo "Acquire::http::proxy  \"${HTTP_PROXY}\";" >> /etc/apt/apt.conf; fi && \
25     if [ ! -z ${HTTPS_PROXY} ]; then echo "Acquire::https::proxy \"${HTTPS_PROXY}\";" >> /etc/apt/apt.conf; fi
26
27 # Install Tomcat.  This image already has curl.
28 WORKDIR /tmp
29 RUN wget -q http://archive.apache.org/dist/tomcat/tomcat-8/v8.0.37/bin/apache-tomcat-8.0.37.tar.gz
30 RUN tar -xzf ${TOMCATTAR}
31 RUN rm ${TOMCATTAR}
32 # Remove manager and sample apps
33 RUN rm -fr ${TOMCAT}/webapps/[a-z]*
34 RUN mkdir -p /opt
35 RUN mv ${TOMCAT} /opt
36
37 WORKDIR ${TOMCATHOME}/webapps
38 RUN mkdir ECOMPPORTAL && mkdir ECOMPSDKAPP
39
40 # Portal has many parts
41 COPY $PORTAL_WAR ECOMPPORTAL
42 RUN cd ECOMPPORTAL && unzip -q *.war && rm *.war
43 COPY ${FE_DIR} ECOMPPORTAL/public
44
45 # SDK app has only a war
46 COPY $SDK_WAR ECOMPSDKAPP
47 RUN cd ECOMPSDKAPP && unzip -q *.war && rm *.war
48
49 VOLUME ${TOMCATHOME}/logs
50
51 # Switch back to root
52 WORKDIR /
53
54 # Define commonly used ENV variables
55 ENV PATH $PATH:$JAVA_HOME/bin:${TOMCATHOME}/bin
56 # Install the wait script
57 COPY wait-for.sh /
58 # Install the launch script
59 COPY start-apps-cmd.sh /
60
61 # Define default command
62 CMD /start-apps-cmd.sh