X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=sdnc-a1-controller%2Foam%2Finstallation%2Fsdnc-a1%2Fsrc%2Fmain%2Fdocker%2Fstandalone.Dockerfile;h=e80187a250f6fc4925ab074bdf47650aef45f74b;hb=f143706ec8de3bc7e2c9c5d4c0ba07471f602f20;hp=3077ee5adcad4eb68f2ce758d902bc8fb0e430ba;hpb=3134679dec4f273afbb768c8ff71a5f50f5a6a4c;p=nonrtric.git diff --git a/sdnc-a1-controller/oam/installation/sdnc-a1/src/main/docker/standalone.Dockerfile b/sdnc-a1-controller/oam/installation/sdnc-a1/src/main/docker/standalone.Dockerfile index 3077ee5a..e80187a2 100755 --- a/sdnc-a1-controller/oam/installation/sdnc-a1/src/main/docker/standalone.Dockerfile +++ b/sdnc-a1-controller/oam/installation/sdnc-a1/src/main/docker/standalone.Dockerfile @@ -1,3 +1,20 @@ +# ============LICENSE_START=============================================== +# Modifications Copyright (C) 2020 Nordix Foundation. All rights reserved. +# ======================================================================== +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============LICENSE_END================================================= +# + # Prepare stage for multistage image build ## START OF STAGE0 ## FROM nexus3.onap.org:10001/onap/ccsdk-odlsli-alpine-image:${ccsdk.docker.version} AS stage0 @@ -25,13 +42,11 @@ MAINTAINER O-RAN-SC NONRTRIC Team ENV JAVA_HOME /usr/lib/jvm/java-1.8-openjdk ENV ODL_HOME /opt/opendaylight ENV SDNC_CONFIG_DIR /opt/onap/sdnc/data/properties -ENV SDNC_STORE_DIR /opt/onap/sdnc/data/stores -ENV SSL_CERTS_DIR /etc/ssl/certs -ENV JAVA_SECURITY_DIR $SSL_CERTS_DIR/java +ENV JAVA_SECURITY_DIR /etc/ssl/certs/java ENV SDNC_NORTHBOUND_REPO mvn:org.o-ran-sc.nonrtric.sdnc-a1.northbound/sdnc-a1-northbound-all/${sdnc.northbound.version}/xml/features -ENV SDNC_KEYSTORE ${sdnc.keystore} -ENV SDNC_KEYPASS ${sdnc.keypass} -ENV SDNC_SECUREPORT ${sdnc.secureport} +ENV SDNC_KEYSTORE keystore.jks +ENV SDNC_TRUSTSTORE truststore.jks +ENV SDNC_SECUREPORT 8443 USER root @@ -43,21 +58,17 @@ RUN sed -i -e "\|featuresRepositories|s|$|,${SDNC_NORTHBOUND_REPO}|" $ODL_HOME/ RUN sed -i -e "\|featuresBoot[^a-zA-Z]|s|$|,sdnc-a1-northbound-all|" $ODL_HOME/etc/org.apache.karaf.features.cfg RUN sed -i "s/odl-restconf-all/odl-restconf-all,odl-netconf-topology/g" $ODL_HOME/etc/org.apache.karaf.features.cfg -# Install ssl and java certificates -COPY truststoreONAPall.jks $JAVA_SECURITY_DIR -COPY truststoreONAPall.jks $SDNC_STORE_DIR -RUN keytool -importkeystore -srckeystore $JAVA_SECURITY_DIR/truststoreONAPall.jks -srcstorepass changeit -destkeystore $JAVA_SECURITY_DIR/cacerts -deststorepass changeit +# Install java certificate +COPY $SDNC_KEYSTORE $JAVA_SECURITY_DIR +COPY $SDNC_TRUSTSTORE $JAVA_SECURITY_DIR # Secure with TLS RUN echo org.osgi.service.http.secure.enabled=true >> $ODL_HOME/etc/custom.properties RUN echo org.osgi.service.http.secure.port=$SDNC_SECUREPORT >> $ODL_HOME/etc/custom.properties -RUN echo org.ops4j.pax.web.ssl.keystore=$SDNC_STORE_DIR/$SDNC_KEYSTORE >> $ODL_HOME/etc/custom.properties -RUN echo org.ops4j.pax.web.ssl.password=$SDNC_KEYPASS >> $ODL_HOME/etc/custom.properties -RUN echo org.ops4j.pax.web.ssl.keypassword=$SDNC_KEYPASS >> $ODL_HOME/etc/custom.properties RUN chown -R odl:odl /opt USER odl ENTRYPOINT /opt/onap/sdnc/bin/startODL.sh -EXPOSE 8181 +EXPOSE 8181 $SDNC_SECUREPORT