summaryrefslogtreecommitdiffstats
path: root/deliveries/Dockerfile.sdk
diff options
context:
space:
mode:
authorst782s <statta@research.att.com>2018-01-30 17:29:36 -0500
committerst782s <statta@research.att.com>2018-02-01 15:10:02 -0500
commit21a8761f684745bb300e075c7e98ad897ace9eed (patch)
tree6d585c3fe39fbb42a314941dbc8646e6ccf188cf /deliveries/Dockerfile.sdk
parent3af8af1310d5a27cb58be29505573f0bbdc1717c (diff)
Security/ Package Name changes
Issue-ID: PORTAL-174, PORTAL-157, PORTAL-156, PORTAL-148, PORTAL-145, PORTAL-140, PORTAL-133, PORTAL-121, PORTAL-111, PORTAL-88 Includes security fixes, Role Centralization, replace certain ECOMP occurrences etc Change-Id: I3c8b706709c6b92e646e3cbe50c2d660e8a46ef4 Signed-off-by: st782s <statta@research.att.com>
Diffstat (limited to 'deliveries/Dockerfile.sdk')
-rw-r--r--deliveries/Dockerfile.sdk53
1 files changed, 53 insertions, 0 deletions
diff --git a/deliveries/Dockerfile.sdk b/deliveries/Dockerfile.sdk
new file mode 100644
index 00000000..d5603871
--- /dev/null
+++ b/deliveries/Dockerfile.sdk
@@ -0,0 +1,53 @@
+# Dockerfile for image with ONAP Portal SDK demo app
+
+# Yields an image 823 MB
+FROM frolvlad/alpine-oraclejdk8:slim
+# Yields an image 1.4 GB
+# FROM openjdk:8-jdk
+
+# Arguments are supplied by build.sh script
+# the defaults below only support testing
+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
+
+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}
+# Remove manager and sample apps
+RUN rm -fr ${TOMCAT}/webapps/[a-z]*
+RUN mkdir -p /opt
+RUN mv ${TOMCAT} /opt
+
+WORKDIR ${TOMCATHOME}/webapps
+RUN mkdir ${SDKCONTEXT}
+
+# SDK app has only a war
+COPY $SDK_WAR ${SDKCONTEXT}
+RUN cd ${SDKCONTEXT} && unzip -q *.war && rm *.war
+
+VOLUME ${TOMCATHOME}/logs
+
+# Switch back to root
+WORKDIR /
+
+# Define commonly used ENV variables
+ENV PATH $PATH:$JAVA_HOME/bin:${TOMCATHOME}/bin
+# Install the launch script
+COPY start-apache-tomcat.sh /
+
+# Define default command
+CMD /start-apache-tomcat.sh