Andrea Campanella | 8663fe4 | 2017-11-30 19:02:12 +0100 | [diff] [blame] | 1 | FROM onosproject/onos:1.10.10 as build |
David K. Bainbridge | 251024b | 2017-08-10 09:11:23 -0700 | [diff] [blame] | 2 | MAINTAINER Open Networking Foundation <info@opennetworking.org> |
| 3 | |
| 4 | ENV BUILD_ROOT=/build |
| 5 | |
| 6 | COPY apps/ /build |
| 7 | |
| 8 | # The ENV settings for ONOS, KARAF_VERSION, KARAF_ROOT, KARAF_M2, and APPS_ROOT |
| 9 | # must be replicated below to the final image as they are shared between stages |
| 10 | ENV ONOS=/root/onos |
| 11 | ENV APPS_ROOT=${ONOS}/apps |
David K. Bainbridge | 56da957 | 2017-08-17 09:56:50 -0700 | [diff] [blame] | 12 | ENV KARAF_VERSION=3.0.8 |
David K. Bainbridge | 251024b | 2017-08-10 09:11:23 -0700 | [diff] [blame] | 13 | ENV KARAF_ROOT=${ONOS}/apache-karaf-${KARAF_VERSION} |
| 14 | ENV KARAF_M2=${KARAF_ROOT}/system |
| 15 | ENV APP_INSTALL_ROOT=/expand |
| 16 | |
| 17 | # Specify application versions to install |
David K. Bainbridge | fcaa26b | 2017-09-08 12:02:48 -0700 | [diff] [blame] | 18 | ENV AAA_VERSION=1.4.0-SNAPSHOT \ |
| 19 | CONFIG_VERSION=1.4.0-SNAPSHOT \ |
| 20 | IGMP_VERSION=1.4.0-SNAPSHOT \ |
| 21 | IGMP_PROXY_VERSION=1.2.0-SNAPSHOT \ |
| 22 | MCAST_VERSION=1.4.0-SNAPSHOT \ |
| 23 | OLT_VERSION=1.4.0-SNAPSHOT \ |
| 24 | SADIS_VERSION=1.2.0-SNAPSHOT \ |
| 25 | VTN_VERSION=1.4.0-SNAPSHOT \ |
| 26 | L2_DHCP_RELAY_VERSION=1.2.0-SNAPSHOT |
David K. Bainbridge | 251024b | 2017-08-10 09:11:23 -0700 | [diff] [blame] | 27 | |
| 28 | ENV APPS="aaa-${AAA_VERSION} \ |
| 29 | cord-config-${CONFIG_VERSION} \ |
| 30 | igmp-${IGMP_VERSION} \ |
| 31 | mcast-${MCAST_VERSION} \ |
| 32 | olt-app-${OLT_VERSION} \ |
| 33 | sadis-app-${SADIS_VERSION} \ |
| 34 | vtn-${VTN_VERSION} \ |
| 35 | aaa-${AAA_VERSION} \ |
| 36 | onos-app-igmpproxy-${IGMP_PROXY_VERSION} \ |
| 37 | dhcpl2relay-${L2_DHCP_RELAY_VERSION}" |
| 38 | |
| 39 | # Install the applications |
| 40 | COPY config/app-install.sh . |
David K. Bainbridge | e26c870 | 2017-08-11 11:04:39 -0700 | [diff] [blame] | 41 | RUN chmod 755 ./app-install.sh |
| 42 | RUN ./app-install.sh |
David K. Bainbridge | 251024b | 2017-08-10 09:11:23 -0700 | [diff] [blame] | 43 | |
| 44 | # Create the final image coping over the installed applications from the build stage |
Andrea Campanella | 8663fe4 | 2017-11-30 19:02:12 +0100 | [diff] [blame] | 45 | FROM onosproject/onos:1.10.10 |
David K. Bainbridge | 56da957 | 2017-08-17 09:56:50 -0700 | [diff] [blame] | 46 | |
| 47 | # Install Key Store Options |
| 48 | 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}" |
David K. Bainbridge | 251024b | 2017-08-10 09:11:23 -0700 | [diff] [blame] | 49 | |
| 50 | ENV ONOS=/root/onos |
David K. Bainbridge | 56da957 | 2017-08-17 09:56:50 -0700 | [diff] [blame] | 51 | ENV KARAF_VERSION=3.0.8 |
David K. Bainbridge | 251024b | 2017-08-10 09:11:23 -0700 | [diff] [blame] | 52 | ENV KARAF_ROOT=${ONOS}/apache-karaf-${KARAF_VERSION} |
| 53 | ENV KARAF_M2=${KARAF_ROOT}/system |
| 54 | ENV APPS_ROOT=${ONOS}/apps |
| 55 | |
| 56 | COPY --from=build ${KARAF_M2}/ ${KARAF_M2}/ |
| 57 | RUN echo "${KARAF_M2} ${APPS_ROOT}" |
| 58 | COPY --from=build ${APPS_ROOT}/ ${APPS_ROOT}/ |
| 59 | COPY config/netcfg.json $KARAF_ROOT/../config/network-cfg.json |
| 60 | |
David K. Bainbridge | 56da957 | 2017-08-17 09:56:50 -0700 | [diff] [blame] | 61 | RUN touch $ONOS/apps/org.onosproject.hostprovider/active |
David K. Bainbridge | 251024b | 2017-08-10 09:11:23 -0700 | [diff] [blame] | 62 | RUN touch $ONOS/apps/org.onosproject.openflow-base/active |
David K. Bainbridge | 56da957 | 2017-08-17 09:56:50 -0700 | [diff] [blame] | 63 | RUN touch $ONOS/apps/org.onosproject.openflow-base/active |
| 64 | |
| 65 | # Create ONOS Key Directory |
| 66 | RUN mkdir -p /home/sdn/wiki |
| 67 | COPY docker/onos_cfg/ /home/sdn/wiki |