diff options
author | Dan Timoney <dtimoney@att.com> | 2020-03-27 17:37:06 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-03-27 17:37:06 +0000 |
commit | 80d0edc969784b39aa8643ca8f029a6c4eab8b17 (patch) | |
tree | 1cb54a02fb53531934f10f9c495cbfd1a0873c26 /sliboot/src/main/docker/Dockerfile | |
parent | 46092d7fa8fbc363eece6a0a9425a48e1ae4dd62 (diff) | |
parent | ca18ff35be6ce2c2d59a23c8e92759e4afe55fb6 (diff) |
Merge "Add new sliboot container"
Diffstat (limited to 'sliboot/src/main/docker/Dockerfile')
-rw-r--r-- | sliboot/src/main/docker/Dockerfile | 46 |
1 files changed, 17 insertions, 29 deletions
diff --git a/sliboot/src/main/docker/Dockerfile b/sliboot/src/main/docker/Dockerfile index 024043b6..3be2717e 100644 --- a/sliboot/src/main/docker/Dockerfile +++ b/sliboot/src/main/docker/Dockerfile @@ -3,18 +3,12 @@ FROM ${base.image.name}:${project.docker.latestfulltag.version} AS stage0 ENV JAVA_HOME /usr/lib/jvm/java-1.8-openjdk -ENV ODL_HOME /opt/opendaylight +ENV LOG_PATH /var/log/onap/ccsdk -# copy the opendaylight credentials -COPY idmlight.db.mv.db $ODL_HOME/data - -# copy CCSDK mvn artifacts to ODL repository -COPY system /tmp/system -RUN rsync -a /tmp/system $ODL_HOME # copy deliverables to opt COPY opt /opt -COPY org.ops4j.pax.logging.cfg $ODL_HOME/etc/org.ops4j.pax.logging.cfg + ## END OF STAGE0 ## @@ -23,16 +17,11 @@ FROM ${base.image.name}:${project.docker.latestfulltag.version} MAINTAINER CCSDK Team (onap-ccsdk@lists.onap.org) ENV JAVA_HOME /usr/lib/jvm/java-1.8-openjdk -ENV ODL_HOME /opt/opendaylight -ENV SDNC_CONFIG_DIR /opt/onap/ccsdk/data/properties -ENV CCSDK_SLI_CORE_REPO mvn:org.onap.ccsdk.sli.core/ccsdk-sli-core-all/${ccsdk.sli.core.version}/xml/features -ENV CCSDK_SLI_ADAPTORS_REPO mvn:org.onap.ccsdk.sli.adaptors/ccsdk-sli-adaptors-all/${ccsdk.sli.adaptors.version}/xml/features -ENV CCSDK_FEATURES_REPO mvn:org.onap.ccsdk.features/ccsdk-features-all/${ccsdk.features.version}/xml/features -ENV CCSDK_FEATURES_SDNR_WT_REPO mvn:org.onap.ccsdk.features.sdnr.wt/sdnr-wt-feature-aggregator/${ccsdk.features.version}/xml/features -ENV CCSDK_SLI_NORTHBOUND_REPO mvn:org.onap.ccsdk.sli.northbound/ccsdk-sli-northbound-all/${ccsdk.sli.northbound.version}/xml/features -ENV CCSDK_SLI_PLUGINS_REPO mvn:org.onap.ccsdk.sli.plugins/ccsdk-sli-plugins-all/${ccsdk.sli.plugins.version}/xml/features -ENV ANSIBLE_GPG_KEY ${ansible.gpg.key} -ENV ODL_BOOT_FEATURES_EXTRA ${odl.boot.features.extra} +ENV CCSDK_HOME /opt/onap/ccsdk +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 @@ -41,17 +30,16 @@ 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 odl user -RUN addgroup -S odl && adduser -S odl -G odl -RUN addgroup odl wheel +# Create sli user +RUN addgroup -S sli && adduser -S sli -G sli +RUN addgroup sli wheel -COPY --from=stage0 --chown=odl:odl /opt /opt +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 -# Add CCSDK repositories to boot repositories -RUN cp $ODL_HOME/etc/org.apache.karaf.features.cfg $ODL_HOME/etc/org.apache.karaf.features.cfg.orig -RUN sed -i -e "\|featuresRepositories|s|$|, ${CCSDK_SLI_CORE_REPO}, ${CCSDK_SLI_ADAPTORS_REPO}, ${CCSDK_SLI_NORTHBOUND_REPO}, ${CCSDK_SLI_PLUGINS_REPO}, ${CCSDK_FEATURES_REPO}|" $ODL_HOME/etc/org.apache.karaf.features.cfg -RUN sed -i -e "\|featuresBoot[^a-zA-Z]|s|$|,${ODL_BOOT_FEATURES_EXTRA}|" $ODL_HOME/etc/org.apache.karaf.features.cfg -USER odl -ENTRYPOINT /opt/onap/ccsdk/bin/startODL.sh -EXPOSE 8181 +USER sli +WORKDIR ${CCSDK_HOME} +ENTRYPOINT /opt/onap/ccsdk/bin/startSliboot.sh +EXPOSE 8080 |