David K. Bainbridge | b6f72c1 | 2017-08-22 13:22:23 -0700 | [diff] [blame] | 1 | FROM maven:3-jdk-8-alpine as download |
David K. Bainbridge | e098254 | 2017-08-22 10:58:49 -0700 | [diff] [blame] | 2 | MAINTAINER Open Networking Foundation <info@opennetworking.org> |
| 3 | |
David K. Bainbridge | b6f72c1 | 2017-08-22 13:22:23 -0700 | [diff] [blame] | 4 | #RUN apt-get update && apt-get install -y maven |
| 5 | |
| 6 | # The ENV settings must be replicated below as they are not shared between stages |
| 7 | ENV DOWNLOAD_ROOT=/download |
| 8 | |
| 9 | # Build the applications |
| 10 | RUN mkdir -p ${DOWNLOAD_ROOT} |
| 11 | WORKDIR ${DOWNLOAD_ROOT} |
| 12 | ADD config/dependencies.xml . |
| 13 | RUN mvn dependency:copy -Dmdep.useBaseVersion=true -DoutputDirectory=${DOWNLOAD_ROOT} -Dsilent=true -f dependencies.xml |
| 14 | |
| 15 | FROM onosproject/onos:1.10.3 as install |
| 16 | MAINTAINER Open Networking Foundation <info@opennetworking.org> |
| 17 | |
| 18 | # The ENV settings must be replicated below as they are not shared between stages |
David K. Bainbridge | e098254 | 2017-08-22 10:58:49 -0700 | [diff] [blame] | 19 | ENV ONOS=/root/onos |
David K. Bainbridge | e098254 | 2017-08-22 10:58:49 -0700 | [diff] [blame] | 20 | ENV KARAF_VERSION=3.0.8 |
| 21 | ENV KARAF_ROOT=${ONOS}/apache-karaf-${KARAF_VERSION} |
David K. Bainbridge | b6f72c1 | 2017-08-22 13:22:23 -0700 | [diff] [blame] | 22 | ENV APPS_ROOT=${ONOS}/apps |
David K. Bainbridge | e098254 | 2017-08-22 10:58:49 -0700 | [diff] [blame] | 23 | ENV KARAF_M2=${KARAF_ROOT}/system |
David K. Bainbridge | b6f72c1 | 2017-08-22 13:22:23 -0700 | [diff] [blame] | 24 | ENV DOWNLOAD_ROOT=/download |
David K. Bainbridge | e098254 | 2017-08-22 10:58:49 -0700 | [diff] [blame] | 25 | ENV APP_INSTALL_ROOT=/expand |
| 26 | |
David K. Bainbridge | b6f72c1 | 2017-08-22 13:22:23 -0700 | [diff] [blame] | 27 | # Copy the downloaded artifact to the install stage container |
| 28 | COPY --from=download ${DOWNLOAD_ROOT} ${DOWNLOAD_ROOT} |
David K. Bainbridge | 9f2ec3c | 2017-08-10 09:13:18 -0700 | [diff] [blame] | 29 | |
| 30 | # Install the applications |
David K. Bainbridge | b6f72c1 | 2017-08-22 13:22:23 -0700 | [diff] [blame] | 31 | COPY config/app-install.sh ./app-install.sh |
David K. Bainbridge | f87a5c8 | 2017-08-11 11:04:57 -0700 | [diff] [blame] | 32 | RUN chmod 755 ./app-install.sh |
| 33 | RUN ./app-install.sh |
alshabib | 7db1356 | 2017-01-09 21:21:34 -0800 | [diff] [blame] | 34 | |
David K. Bainbridge | 9f2ec3c | 2017-08-10 09:13:18 -0700 | [diff] [blame] | 35 | # Create the final image coping over the installed applications from the build stage |
David K. Bainbridge | 6c0dc88 | 2017-08-17 09:57:10 -0700 | [diff] [blame] | 36 | FROM onosproject/onos:1.10.3 |
David K. Bainbridge | b6f72c1 | 2017-08-22 13:22:23 -0700 | [diff] [blame] | 37 | MAINTAINER Open Networking Foundation <info@opennetworking.org> |
alshabib | 9fbb223 | 2016-12-23 00:40:08 -0800 | [diff] [blame] | 38 | |
David K. Bainbridge | 138d5d6 | 2017-08-14 14:20:11 -0700 | [diff] [blame] | 39 | # Install Key Store Options |
| 40 | 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}" |
| 41 | |
David K. Bainbridge | b6f72c1 | 2017-08-22 13:22:23 -0700 | [diff] [blame] | 42 | # The ENV settings must be replicated below as they are not shared between stages |
David K. Bainbridge | 9f2ec3c | 2017-08-10 09:13:18 -0700 | [diff] [blame] | 43 | ENV ONOS=/root/onos |
David K. Bainbridge | 6c0dc88 | 2017-08-17 09:57:10 -0700 | [diff] [blame] | 44 | ENV KARAF_VERSION=3.0.8 |
David K. Bainbridge | 9f2ec3c | 2017-08-10 09:13:18 -0700 | [diff] [blame] | 45 | ENV KARAF_ROOT=${ONOS}/apache-karaf-${KARAF_VERSION} |
| 46 | ENV KARAF_M2=${KARAF_ROOT}/system |
| 47 | ENV APPS_ROOT=${ONOS}/apps |
Zsolt Haraszti | 3578a1c | 2017-01-10 15:29:02 -0800 | [diff] [blame] | 48 | |
David K. Bainbridge | b6f72c1 | 2017-08-22 13:22:23 -0700 | [diff] [blame] | 49 | COPY --from=install ${KARAF_M2}/ ${KARAF_M2}/ |
David K. Bainbridge | 9f2ec3c | 2017-08-10 09:13:18 -0700 | [diff] [blame] | 50 | RUN echo "${KARAF_M2} ${APPS_ROOT}" |
David K. Bainbridge | b6f72c1 | 2017-08-22 13:22:23 -0700 | [diff] [blame] | 51 | COPY --from=install ${APPS_ROOT}/ ${APPS_ROOT}/ |
alshabib | 9fbb223 | 2016-12-23 00:40:08 -0800 | [diff] [blame] | 52 | COPY config/netcfg.json $KARAF_ROOT/../config/network-cfg.json |
schowdhury | cbbe327 | 2017-07-03 17:12:35 -0700 | [diff] [blame] | 53 | |
David K. Bainbridge | 138d5d6 | 2017-08-14 14:20:11 -0700 | [diff] [blame] | 54 | RUN touch $ONOS/apps/org.onosproject.hostprovider/active |
David K. Bainbridge | 9f2ec3c | 2017-08-10 09:13:18 -0700 | [diff] [blame] | 55 | RUN touch $ONOS/apps/org.onosproject.openflow-base/active |
| 56 | |
schowdhury | cbbe327 | 2017-07-03 17:12:35 -0700 | [diff] [blame] | 57 | # Create ONOS Key Directory |
| 58 | RUN mkdir -p /home/sdn/wiki |
| 59 | COPY onos_cfg/ /home/sdn/wiki |
David K. Bainbridge | 9f2ec3c | 2017-08-10 09:13:18 -0700 | [diff] [blame] | 60 | |