blob: acaa845b94beea9576173dd8d86cd7690d3eefaa [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. Bainbridge9f2ec3c2017-08-10 09:13:18 -070052RUN chmod 755 ./app-install.sh && ./app-install.sh
alshabib7db13562017-01-09 21:21:34 -080053
David K. Bainbridge9f2ec3c2017-08-10 09:13:18 -070054# Create the final image coping over the installed applications from the build stage
55FROM onosproject/onos:1.8
alshabib9fbb2232016-12-23 00:40:08 -080056
David K. Bainbridge9f2ec3c2017-08-10 09:13:18 -070057ENV ONOS=/root/onos
58ENV KARAF_VERSION=3.0.5
59ENV KARAF_ROOT=${ONOS}/apache-karaf-${KARAF_VERSION}
60ENV KARAF_M2=${KARAF_ROOT}/system
61ENV APPS_ROOT=${ONOS}/apps
Zsolt Haraszti3578a1c2017-01-10 15:29:02 -080062
David K. Bainbridge9f2ec3c2017-08-10 09:13:18 -070063COPY --from=build ${KARAF_M2}/ ${KARAF_M2}/
64RUN echo "${KARAF_M2} ${APPS_ROOT}"
65COPY --from=build ${APPS_ROOT}/ ${APPS_ROOT}/
alshabib9fbb2232016-12-23 00:40:08 -080066COPY config/netcfg.json $KARAF_ROOT/../config/network-cfg.json
schowdhurycbbe3272017-07-03 17:12:35 -070067
David K. Bainbridge9f2ec3c2017-08-10 09:13:18 -070068RUN touch $ONOS/apps/org.onosproject.netcfghostprovider/active
69RUN touch $ONOS/apps/org.onosproject.netcfglinksprovider/active
70RUN touch $ONOS/apps/org.onosproject.openflow-base/active
71
schowdhurycbbe3272017-07-03 17:12:35 -070072# Create ONOS Key Directory
73RUN mkdir -p /home/sdn/wiki
74COPY onos_cfg/ /home/sdn/wiki
David K. Bainbridge9f2ec3c2017-08-10 09:13:18 -070075