Update tomcat to 8.5
[portal.git] / deliveries / Dockerfile.sdk
1 # Dockerfile for SDK image with ONAP Portal
2
3 FROM tomcat:8.5.35-jre8-alpine
4
5 # Arguments are supplied by build.sh script
6 # the defaults below only support testing
7 ARG SDK_WAR=build/epsdk-app-os.war
8 ARG HTTP_PROXY
9 ARG HTTPS_PROXY
10
11
12 # Just variables, never passed in
13 ARG SDKCONTEXT=ONAPPORTALSDK
14
15 ARG TOMCAT=/usr/local/tomcat
16 ARG TOMCATHOME=${TOMCAT}
17 ARG SERVERXML=${SERVERXML}
18
19 ENV http_proxy $HTTP_PROXY
20 ENV https_proxy $HTTPS_PROXY
21 RUN if [ -d /etc/apt ] && [ ! -z ${HTTP_PROXY} ]; then echo "Acquire::http::proxy  \"${HTTP_PROXY}\";" >> /etc/apt/apt.conf; fi && \
22     if [ -d /etc/apt ] && [ ! -z ${HTTPS_PROXY} ]; then echo "Acquire::https::proxy \"${HTTPS_PROXY}\";" >> /etc/apt/apt.conf; fi
23
24
25 # Remove manager and sample apps
26 RUN rm -rf ${TOMCAT}/webapps/[a-z]*
27 RUN mkdir -p /opt
28 COPY ${SERVERXML} ${TOMCAT}/conf
29 # TODO: ????
30 #RUN mv ${TOMCAT} /opt
31
32 WORKDIR ${TOMCATHOME}/webapps
33 RUN mkdir ${SDKCONTEXT}
34
35 # Portal has many parts
36 COPY $SDK_WAR ${SDKCONTEXT}
37 RUN cd ${SDKCONTEXT} && unzip -q *.war && rm *.war
38
39 VOLUME ${TOMCATHOME}/logs
40
41 # Switch back to root
42 WORKDIR /
43
44 # Define commonly used ENV variables
45 ENV PATH $PATH:$JAVA_HOME/bin:${TOMCATHOME}/bin
46 # Install the launch script
47 COPY start-apache-tomcat.sh /
48
49 # Define default command
50 ENV TOMCATHOME=$TOMCATHOME
51 CMD /start-apache-tomcat.sh -b $TOMCATHOME