aboutsummaryrefslogtreecommitdiffstats
path: root/ms/sliboot/src/main/docker/Dockerfile
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2020-06-05 15:46:39 -0400
committerKAPIL SINGAL <ks220y@att.com>2020-06-09 14:24:12 +0000
commit31172d602ff8bce4b4680c3a2da58b6db2e8d9f0 (patch)
treebf66bc083d8f1a46c17132c990c7e725e828514d /ms/sliboot/src/main/docker/Dockerfile
parentc2fac23347ee5dd3f8b6e3180a0206eb979b965e (diff)
Refactor sliapi springboot
Moved sli-api springboot microservice from ccsdk/sli/core to ccsdk/apps Change-Id: Ibecae568cf90b71575403052111e7be9ff543376 Issue-ID: CCSDK-2096 Signed-off-by: Dan Timoney <dtimoney@att.com>
Diffstat (limited to 'ms/sliboot/src/main/docker/Dockerfile')
-rw-r--r--ms/sliboot/src/main/docker/Dockerfile51
1 files changed, 51 insertions, 0 deletions
diff --git a/ms/sliboot/src/main/docker/Dockerfile b/ms/sliboot/src/main/docker/Dockerfile
new file mode 100644
index 00000000..8f424686
--- /dev/null
+++ b/ms/sliboot/src/main/docker/Dockerfile
@@ -0,0 +1,51 @@
+# Prepare stage for multistage image build
+## START OF STAGE0 ##
+FROM @base.image.name@:@project.docker.latestfulltag.version@ AS stage0
+
+ENV JAVA_HOME /usr/lib/jvm/java-1.8-openjdk
+ENV LOG_PATH /var/log/onap/ccsdk
+
+
+# copy deliverables to opt
+COPY opt /opt
+
+## END OF STAGE0 ##
+
+
+FROM @base.image.name@:@project.docker.latestfulltag.version@
+
+MAINTAINER CCSDK Team (onap-ccsdk@lists.onap.org)
+
+ENV PROJECT_VERSION @project.version@
+ENV JAVA_HOME /usr/lib/jvm/java-1.8-openjdk
+ENV CCSDK_HOME /opt/onap/ccsdk
+ENV CCSDK_CONFIG_DIR /opt/onap/ccsdk/config
+ENV SLIBOOT_JAR @ccsdk.sliboot.jar@
+ENV SVCLOGIC_PROPERTIES /opt/onap/ccsdk/config/svclogic.properties
+ENV SVCLOGIC_DIR /opt/onap/ccsdk/svclogic/graphs
+ENV LOG_PATH /var/log/onap/ccsdk
+
+# Install sudo and IP utilities
+RUN apk update && apk --no-cache add sudo iputils openssl
+
+
+# Enable wheel group
+RUN sed -e 's/# %wheel ALL=(ALL) NOPASSWD: ALL/%wheel ALL=(ALL) NOPASSWD: ALL/g' -i /etc/sudoers
+
+# Create sli user
+RUN addgroup -S sli && adduser -S sli -G sli
+RUN addgroup sli wheel
+
+COPY --from=stage0 --chown=sli:sli /opt /opt
+RUN mkdir -p ${LOG_PATH} && chown sli:sli ${LOG_PATH}
+RUN chmod +x ${CCSDK_HOME}/bin/*.sh
+
+# Install ssl and java certificates
+COPY $CCSDK_CONFIG_DIR/truststoreONAPall.jks $JAVA_SECURITY_DIR
+RUN keytool -importkeystore -srckeystore $JAVA_SECURITY_DIR/truststoreONAPall.jks -srcstorepass changeit -destkeystore $JAVA_SECURITY_DIR/cacerts -deststorepass changeit
+
+
+USER sli
+WORKDIR ${CCSDK_HOME}
+ENTRYPOINT /opt/onap/ccsdk/bin/startSliboot.sh
+EXPOSE 8443 8080 8181