summaryrefslogtreecommitdiffstats
path: root/deliveries/Dockerfile.be
diff options
context:
space:
mode:
authorstatta <statta@research.att.com>2019-08-23 16:49:45 -0400
committerstatta <statta@research.att.com>2019-08-23 16:51:05 -0400
commita3a04c5887779e9ca8024a3e87ece109b8d9b0c1 (patch)
treed4c36f55aaba1f5a76bdf95308a0dc5ff21b425a /deliveries/Dockerfile.be
parent7ce177cd99096772ff42ef89d8820070c687fd9b (diff)
Onboarding Page Account Admin Change
Issue-ID: PORTAL-644 Change-Id: I95e43b1a2d12dcb5a4bc56d374cc6d30d8aae3f3 Signed-off-by: statta <statta@research.att.com>
Diffstat (limited to 'deliveries/Dockerfile.be')
-rw-r--r--deliveries/Dockerfile.be54
1 files changed, 54 insertions, 0 deletions
diff --git a/deliveries/Dockerfile.be b/deliveries/Dockerfile.be
new file mode 100644
index 00000000..afc39816
--- /dev/null
+++ b/deliveries/Dockerfile.be
@@ -0,0 +1,54 @@
+# Dockerfile for image with ONAP Portal
+ARG BE_BASE_IMAGE=tomcat:8.5.35-jre8-alpine
+FROM ${BE_BASE_IMAGE}
+
+RUN apk add sudo && echo "portal ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
+# Arguments are supplied by build.sh script
+# the defaults below only support testing
+ARG PORTAL_WAR=build/ecompportal-be-os.war
+ARG HTTP_PROXY
+ARG HTTPS_PROXY
+# ARG PORTAL_CERT=truststoreONAPall.jks
+
+# Just variables, never passed in
+ARG PORTALCONTEXT=ONAPPORTAL
+
+ARG TOMCAT=/usr/local/tomcat
+ARG TOMCATHOME=${TOMCAT}
+ARG SERVERXML=${SERVERXML}
+
+ENV http_proxy $HTTP_PROXY
+ENV https_proxy $HTTPS_PROXY
+
+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 -rf ${TOMCAT}/webapps/[a-z]*
+RUN mkdir -p /opt
+COPY ${SERVERXML} ${TOMCAT}/conf
+# TODO: ????
+#RUN mv ${TOMCAT} /opt
+
+WORKDIR ${TOMCATHOME}/webapps
+RUN mkdir ${PORTALCONTEXT}
+
+# Portal has many parts
+COPY $PORTAL_WAR ${PORTALCONTEXT}
+RUN cd ${PORTALCONTEXT} && unzip -q *.war && rm *.war
+
+VOLUME ${TOMCATHOME}/logs
+
+RUN addgroup -g 1000 -S portal && adduser -u 1000 -S portal -G portal && chown -R portal:portal . && chmod -R 777 /etc/ssl/certs/java /var/
+
+# 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
+ENV TOMCATHOME=$TOMCATHOME
+CMD /start-apache-tomcat.sh -b $TOMCATHOME