summaryrefslogtreecommitdiffstats
path: root/deliveries/Dockerfile.portalapps
diff options
context:
space:
mode:
Diffstat (limited to 'deliveries/Dockerfile.portalapps')
-rw-r--r--deliveries/Dockerfile.portalapps54
1 files changed, 54 insertions, 0 deletions
diff --git a/deliveries/Dockerfile.portalapps b/deliveries/Dockerfile.portalapps
new file mode 100644
index 00000000..3e295e8f
--- /dev/null
+++ b/deliveries/Dockerfile.portalapps
@@ -0,0 +1,54 @@
+# Dockerfile for image with ONAP applications:
+# Portal app, Portal-SDK app, Portal-DBC app.
+
+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
+
+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
+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
+# Remove manager and sample apps
+RUN rm -fr apache-tomcat-8.0.37/webapps/[a-z]*
+RUN mv apache-tomcat-8.0.37 /opt
+
+WORKDIR ${TOMCATHOME}/webapps
+RUN mkdir ECOMPPORTAL && mkdir ECOMPSDKAPP && mkdir ECOMPDBCAPP
+
+# Portal has many parts
+COPY $PORTAL_WAR ECOMPPORTAL
+RUN cd ECOMPPORTAL && unzip -q *.war && rm *.war
+COPY ${FE_DIR} ECOMPPORTAL/public
+
+# SDK app has only a war
+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
+
+# Define commonly used ENV variables
+ENV PATH $PATH:$JAVA_HOME/bin:${TOMCATHOME}/bin
+COPY configure-and-run.sh /
+
+# Define default command.
+CMD ["/configure-and-run.sh"]