| FROM onosproject/onos:1.8 as build |
| MAINTAINER Open Networking Foundation <info@opennetworking.org> |
| |
| ENV BUILD_ROOT=/build |
| |
| COPY apps/ /build |
| |
| # The ENV settings for ONOS, KARAF_VERSION, KARAF_ROOT, KARAF_M2, and APPS_ROOT |
| # must be replicated below to the final image as they are shared between stages |
| ENV ONOS=/root/onos |
| ENV APPS_ROOT=${ONOS}/apps |
| ENV KARAF_VERSION=3.0.5 |
| ENV KARAF_ROOT=${ONOS}/apache-karaf-${KARAF_VERSION} |
| ENV KARAF_M2=${KARAF_ROOT}/system |
| ENV APP_INSTALL_ROOT=/expand |
| |
| # Specify application versions to install |
| ENV AAA_VERSION=1.2.0-SNAPSHOT \ |
| CONFIG_VERSION=1.2.0-SNAPSHOT \ |
| IGMP_VERSION=1.2.0-SNAPSHOT \ |
| IGMP_PROXY_VERSION=1.0.0-SNAPSHOT \ |
| MCAST_VERSION=1.2.0-SNAPSHOT \ |
| OLT_VERSION=1.2.0-SNAPSHOT \ |
| SADIS_VERSION=1.0.0-SNAPSHOT \ |
| VTN_VERSION=1.2.0-SNAPSHOT \ |
| L2_DHCP_RELAY_VERSION=1.0.0-SNAPSHOT |
| |
| ENV APPS="aaa-${AAA_VERSION} \ |
| cord-config-${CONFIG_VERSION} \ |
| igmp-${IGMP_VERSION} \ |
| mcast-${MCAST_VERSION} \ |
| olt-app-${OLT_VERSION} \ |
| sadis-app-${SADIS_VERSION} \ |
| vtn-${VTN_VERSION} \ |
| aaa-${AAA_VERSION} \ |
| onos-app-igmpproxy-${IGMP_PROXY_VERSION} \ |
| dhcpl2relay-${L2_DHCP_RELAY_VERSION}" |
| |
| # Install the applications |
| COPY config/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.8 |
| |
| ENV ONOS=/root/onos |
| ENV KARAF_VERSION=3.0.5 |
| ENV KARAF_ROOT=${ONOS}/apache-karaf-${KARAF_VERSION} |
| ENV KARAF_M2=${KARAF_ROOT}/system |
| ENV APPS_ROOT=${ONOS}/apps |
| |
| COPY --from=build ${KARAF_M2}/ ${KARAF_M2}/ |
| RUN echo "${KARAF_M2} ${APPS_ROOT}" |
| COPY --from=build ${APPS_ROOT}/ ${APPS_ROOT}/ |
| COPY config/netcfg.json $KARAF_ROOT/../config/network-cfg.json |
| |
| RUN touch $ONOS/apps/org.onosproject.netcfghostprovider/active |
| RUN touch $ONOS/apps/org.onosproject.netcfglinksprovider/active |
| RUN touch $ONOS/apps/org.onosproject.openflow-base/active |
| |