X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=deliveries%2FDockerfile.sdk;h=5f96aaad6499d311536d655261cd7815bb502264;hb=5fe839bc8f5b536d5cb48297cf16c4d63e456413;hp=3ae9c4a1a6be359f9516a7e763597db729b0c66b;hpb=a0c16dba6a9bfc8cc698e6dc7dd89b77029d3d94;p=portal.git diff --git a/deliveries/Dockerfile.sdk b/deliveries/Dockerfile.sdk index 3ae9c4a1..5f96aaad 100644 --- a/deliveries/Dockerfile.sdk +++ b/deliveries/Dockerfile.sdk @@ -1,9 +1,6 @@ -# Dockerfile for image with ONAP Portal SDK demo app +# Dockerfile for SDK image with ONAP Portal -# Yields an image 823 MB -FROM openjdk:8-alpine -# Yields an image 1.4 GB -# FROM openjdk:8-jdk +FROM tomcat:8.5.35-jre8-alpine # Arguments are supplied by build.sh script # the defaults below only support testing @@ -11,31 +8,31 @@ ARG SDK_WAR=build/epsdk-app-os.war ARG HTTP_PROXY ARG HTTPS_PROXY + # Just variables, never passed in -ARG TOMCAT=apache-tomcat-8.0.37 -ARG TOMCATTAR=${TOMCAT}.tar.gz -ARG TOMCATHOME=/opt/${TOMCAT} ARG SDKCONTEXT=ONAPPORTALSDK +ARG TOMCAT=/usr/local/tomcat +ARG TOMCATHOME=${TOMCAT} +ARG SERVERXML=${SERVERXML} + 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. This image already has curl. -WORKDIR /tmp -RUN wget -q http://archive.apache.org/dist/tomcat/tomcat-8/v8.0.37/bin/apache-tomcat-8.0.37.tar.gz -RUN tar -xzf ${TOMCATTAR} -RUN rm ${TOMCATTAR} +RUN if [ -d /etc/apt ] && [ ! -z ${HTTP_PROXY} ]; then echo "Acquire::http::proxy \"${HTTP_PROXY}\";" >> /etc/apt/apt.conf; fi && \ + if [ -d /etc/apt ] && [ ! -z ${HTTPS_PROXY} ]; then echo "Acquire::https::proxy \"${HTTPS_PROXY}\";" >> /etc/apt/apt.conf; fi + + # Remove manager and sample apps -RUN rm -fr ${TOMCAT}/webapps/[a-z]* +RUN rm -rf ${TOMCAT}/webapps/[a-z]* RUN mkdir -p /opt -RUN mv ${TOMCAT} /opt +COPY ${SERVERXML} ${TOMCAT}/conf +# TODO: ???? +#RUN mv ${TOMCAT} /opt WORKDIR ${TOMCATHOME}/webapps RUN mkdir ${SDKCONTEXT} -# SDK app has only a war +# Portal has many parts COPY $SDK_WAR ${SDKCONTEXT} RUN cd ${SDKCONTEXT} && unzip -q *.war && rm *.war @@ -50,4 +47,5 @@ ENV PATH $PATH:$JAVA_HOME/bin:${TOMCATHOME}/bin COPY start-apache-tomcat.sh / # Define default command -CMD /start-apache-tomcat.sh +ENV TOMCATHOME=$TOMCATHOME +CMD /start-apache-tomcat.sh -b $TOMCATHOME \ No newline at end of file