| FROM maven:3-jdk-8-alpine as download |
| MAINTAINER Open Networking Foundation <info@opennetworking.org> |
| |
| #RUN apt-get update && apt-get install -y maven |
| |
| # The ENV settings must be replicated below as they are not shared between stages |
| ENV DOWNLOAD_ROOT=/download |
| |
| # Build the applications |
| RUN mkdir -p ${DOWNLOAD_ROOT} |
| WORKDIR ${DOWNLOAD_ROOT} |
| ADD config/dependencies.xml . |
| RUN mvn dependency:copy -Dmdep.useBaseVersion=true -DoutputDirectory=${DOWNLOAD_ROOT} -Dsilent=true -f dependencies.xml |
| |
| FROM onosproject/onos:1.10.9 as install |
| MAINTAINER Open Networking Foundation <info@opennetworking.org> |
| |
| # The ENV settings must be replicated below as they are not shared between stages |
| ENV ONOS=/root/onos |
| ENV KARAF_VERSION=3.0.8 |
| ENV KARAF_ROOT=${ONOS}/apache-karaf-${KARAF_VERSION} |
| ENV APPS_ROOT=${ONOS}/apps |
| ENV KARAF_M2=${KARAF_ROOT}/system |
| ENV DOWNLOAD_ROOT=/download |
| ENV APP_INSTALL_ROOT=/expand |
| |
| # Copy the downloaded artifact to the install stage container |
| COPY --from=download ${DOWNLOAD_ROOT} ${DOWNLOAD_ROOT} |
| |
| # Install the applications |
| COPY config/app-install.sh ./app-install.sh |
| RUN chmod 755 ./app-install.sh |
| RUN ./app-install.sh |
| |
| # Create the final image coping over the installed applications from the build stage |
| FROM onosproject/onos:1.10.9 |
| MAINTAINER Open Networking Foundation <info@opennetworking.org> |
| |
| # Install Key Store Options |
| ENV JAVA_OPTS="${JAVA_OPTS:--DenableOFTLS=true -Djavax.net.ssl.keyStore=/home/sdn/wiki/onos.jks -Djavax.net.ssl.keyStorePassword=222222 -Djavax.net.ssl.trustStore=/home/sdn/wiki/onos.jks -Djavax.net.ssl.trustStorePassword=222222}" |
| |
| # The ENV settings must be replicated below as they are not shared between stages |
| ENV ONOS=/root/onos |
| ENV KARAF_VERSION=3.0.8 |
| ENV KARAF_ROOT=${ONOS}/apache-karaf-${KARAF_VERSION} |
| ENV KARAF_M2=${KARAF_ROOT}/system |
| ENV APPS_ROOT=${ONOS}/apps |
| |
| COPY --from=install ${KARAF_M2}/ ${KARAF_M2}/ |
| RUN echo "${KARAF_M2} ${APPS_ROOT}" |
| COPY --from=install ${APPS_ROOT}/ ${APPS_ROOT}/ |
| COPY config/netcfg.json $KARAF_ROOT/../config/network-cfg.json |
| |
| RUN touch $ONOS/apps/org.onosproject.hostprovider/active |
| RUN touch $ONOS/apps/org.onosproject.openflow-base/active |
| |
| # Create ONOS Key Directory |
| RUN mkdir -p /home/sdn/wiki |
| COPY onos_cfg/ /home/sdn/wiki |
| |