1 # Dockerfile for image with ONAP Portal SDK demo app
3 # Yields an image 823 MB
4 FROM frolvlad/alpine-oraclejdk8:slim
5 # Yields an image 1.4 GB
8 # Arguments are supplied by build.sh script
9 # the defaults below only support testing
10 ARG SDK_WAR=build/epsdk-app-os.war
14 # Just variables, never passed in
15 ARG TOMCAT=apache-tomcat-8.0.37
16 ARG TOMCATTAR=${TOMCAT}.tar.gz
17 ARG TOMCATHOME=/opt/${TOMCAT}
18 ARG SDKCONTEXT=ONAPPORTALSDK
20 ENV http_proxy $HTTP_PROXY
21 ENV https_proxy $HTTPS_PROXY
22 RUN if [ ! -z ${HTTP_PROXY} ]; then echo "Acquire::http::proxy \"${HTTP_PROXY}\";" >> /etc/apt/apt.conf; fi && \
23 if [ ! -z ${HTTPS_PROXY} ]; then echo "Acquire::https::proxy \"${HTTPS_PROXY}\";" >> /etc/apt/apt.conf; fi
25 # Install Tomcat. This image already has curl.
27 RUN wget -q http://archive.apache.org/dist/tomcat/tomcat-8/v8.0.37/bin/apache-tomcat-8.0.37.tar.gz
28 RUN tar -xzf ${TOMCATTAR}
30 # Remove manager and sample apps
31 RUN rm -fr ${TOMCAT}/webapps/[a-z]*
35 WORKDIR ${TOMCATHOME}/webapps
36 RUN mkdir ${SDKCONTEXT}
38 # SDK app has only a war
39 COPY $SDK_WAR ${SDKCONTEXT}
40 RUN cd ${SDKCONTEXT} && unzip -q *.war && rm *.war
42 VOLUME ${TOMCATHOME}/logs
47 # Define commonly used ENV variables
48 ENV PATH $PATH:$JAVA_HOME/bin:${TOMCATHOME}/bin
49 # Install the launch script
50 COPY start-apache-tomcat.sh /
52 # Define default command
53 CMD /start-apache-tomcat.sh