blob: 60d40e3d46260e8ff2e55dfa865e6e307e501c06 [file] [log] [blame]
David K. Bainbridge9f2ec3c2017-08-10 09:13:18 -07001FROM onosproject/onos:1.8 as build
2MAINTAINER Open Networking Foundation <info@opennetworking.org>
alshabib9fbb2232016-12-23 00:40:08 -08003
David K. Bainbridge9f2ec3c2017-08-10 09:13:18 -07004# Install and configure build tools
schowdhurycbbe3272017-07-03 17:12:35 -07005ENV 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}"
6
David K. Bainbridge9f2ec3c2017-08-10 09:13:18 -07007RUN apt-get update && apt-get install -y git maven unzip curl python
8RUN curl -sSL http://commondatastorage.googleapis.com/git-repo-downloads/repo -o /bin/repo && chmod 755 /bin/repo
alshabib7db13562017-01-09 21:21:34 -08009
David K. Bainbridge9f2ec3c2017-08-10 09:13:18 -070010# The ENV settings for ONOS, KARAF_VERSION, KARAF_ROOT, KARAF_M2, and APPS_ROOT
11# must be replicated below to the final image as they are shared between stages
12ENV ONOS=/root/onos
13ENV APPS_ROOT=${ONOS}/apps
14ENV KARAF_VERSION=3.0.5
15ENV KARAF_ROOT=${ONOS}/apache-karaf-${KARAF_VERSION}
16ENV KARAF_M2=${KARAF_ROOT}/system
17ENV MANIFEST_BRANCH=master
18ENV BUILD_ROOT=/build
19ENV APP_INSTALL_ROOT=/expand
alshabib7db13562017-01-09 21:21:34 -080020
David K. Bainbridge9f2ec3c2017-08-10 09:13:18 -070021# Build the applications
22RUN mkdir -p ${BUILD_ROOT}
23WORKDIR ${BUILD_ROOT}
24RUN repo init -u http://gerrit.opencord.org/manifest -b ${MANIFEST_BRANCH} -g onos && repo sync
25WORKDIR ${BUILD_ROOT}/onos-apps/apps
26RUN mvn -DskipTests=true clean install
27
28# Specify application versions to install
29ENV AAA_VERSION=1.2.0-SNAPSHOT \
30 CONFIG_VERSION=1.2.0-SNAPSHOT \
31 IGMP_VERSION=1.2.0-SNAPSHOT \
32 IGMP_PROXY_VERSION=1.0.0-SNAPSHOT \
33 MCAST_VERSION=1.2.0-SNAPSHOT \
34 OLT_VERSION=1.2.0-SNAPSHOT \
35 SADIS_VERSION=1.0.0-SNAPSHOT \
36 VTN_VERSION=1.2.0-SNAPSHOT \
37 L2_DHCP_RELAY_VERSION=1.0.0-SNAPSHOT
38
39ENV APPS="aaa-${AAA_VERSION} \
40 cord-config-${CONFIG_VERSION} \
41 igmp-${IGMP_VERSION} \
42 mcast-${MCAST_VERSION} \
43 olt-app-${OLT_VERSION} \
44 sadis-app-${SADIS_VERSION} \
45 vtn-${VTN_VERSION} \
46 aaa-${AAA_VERSION} \
47 onos-app-igmpproxy-${IGMP_PROXY_VERSION} \
48 dhcpl2relay-${L2_DHCP_RELAY_VERSION}"
49
50# Install the applications
alshabib7db13562017-01-09 21:21:34 -080051COPY config/app-install.sh .
David K. Bainbridgef87a5c82017-08-11 11:04:57 -070052RUN chmod 755 ./app-install.sh
53RUN ./app-install.sh
alshabib7db13562017-01-09 21:21:34 -080054
David K. Bainbridge9f2ec3c2017-08-10 09:13:18 -070055# Create the final image coping over the installed applications from the build stage
56FROM onosproject/onos:1.8
alshabib9fbb2232016-12-23 00:40:08 -080057
David K. Bainbridge9f2ec3c2017-08-10 09:13:18 -070058ENV ONOS=/root/onos
59ENV KARAF_VERSION=3.0.5
60ENV KARAF_ROOT=${ONOS}/apache-karaf-${KARAF_VERSION}
61ENV KARAF_M2=${KARAF_ROOT}/system
62ENV APPS_ROOT=${ONOS}/apps
Zsolt Haraszti3578a1c2017-01-10 15:29:02 -080063
David K. Bainbridge9f2ec3c2017-08-10 09:13:18 -070064COPY --from=build ${KARAF_M2}/ ${KARAF_M2}/
65RUN echo "${KARAF_M2} ${APPS_ROOT}"
66COPY --from=build ${APPS_ROOT}/ ${APPS_ROOT}/
alshabib9fbb2232016-12-23 00:40:08 -080067COPY config/netcfg.json $KARAF_ROOT/../config/network-cfg.json
schowdhurycbbe3272017-07-03 17:12:35 -070068
David K. Bainbridge9f2ec3c2017-08-10 09:13:18 -070069RUN touch $ONOS/apps/org.onosproject.netcfghostprovider/active
70RUN touch $ONOS/apps/org.onosproject.netcfglinksprovider/active
71RUN touch $ONOS/apps/org.onosproject.openflow-base/active
72
schowdhurycbbe3272017-07-03 17:12:35 -070073# Create ONOS Key Directory
74RUN mkdir -p /home/sdn/wiki
75COPY onos_cfg/ /home/sdn/wiki
David K. Bainbridge9f2ec3c2017-08-10 09:13:18 -070076