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