blob: 18b28423eae964fa242f5cad80c35f1f891f240f [file] [log] [blame]
David K. Bainbridge251024b2017-08-10 09:11:23 -07001FROM onosproject/onos:1.8 as build
2MAINTAINER Open Networking Foundation <info@opennetworking.org>
3
4ENV BUILD_ROOT=/build
5
6COPY 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
10ENV ONOS=/root/onos
11ENV APPS_ROOT=${ONOS}/apps
12ENV KARAF_VERSION=3.0.5
13ENV KARAF_ROOT=${ONOS}/apache-karaf-${KARAF_VERSION}
14ENV KARAF_M2=${KARAF_ROOT}/system
15ENV APP_INSTALL_ROOT=/expand
16
17# Specify application versions to install
18ENV AAA_VERSION=1.2.0-SNAPSHOT \
19 CONFIG_VERSION=1.2.0-SNAPSHOT \
20 IGMP_VERSION=1.2.0-SNAPSHOT \
21 IGMP_PROXY_VERSION=1.0.0-SNAPSHOT \
22 MCAST_VERSION=1.2.0-SNAPSHOT \
23 OLT_VERSION=1.2.0-SNAPSHOT \
24 SADIS_VERSION=1.0.0-SNAPSHOT \
25 VTN_VERSION=1.2.0-SNAPSHOT \
26 L2_DHCP_RELAY_VERSION=1.0.0-SNAPSHOT
27
28ENV 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
40COPY config/app-install.sh .
David K. Bainbridgee26c8702017-08-11 11:04:39 -070041RUN chmod 755 ./app-install.sh
42RUN ./app-install.sh
David K. Bainbridge251024b2017-08-10 09:11:23 -070043
44# Create the final image coping over the installed applications from the build stage
45FROM onosproject/onos:1.8
46
47ENV ONOS=/root/onos
48ENV KARAF_VERSION=3.0.5
49ENV KARAF_ROOT=${ONOS}/apache-karaf-${KARAF_VERSION}
50ENV KARAF_M2=${KARAF_ROOT}/system
51ENV APPS_ROOT=${ONOS}/apps
52
53COPY --from=build ${KARAF_M2}/ ${KARAF_M2}/
54RUN echo "${KARAF_M2} ${APPS_ROOT}"
55COPY --from=build ${APPS_ROOT}/ ${APPS_ROOT}/
56COPY config/netcfg.json $KARAF_ROOT/../config/network-cfg.json
57
58RUN touch $ONOS/apps/org.onosproject.netcfghostprovider/active
59RUN touch $ONOS/apps/org.onosproject.netcfglinksprovider/active
60RUN touch $ONOS/apps/org.onosproject.openflow-base/active
61