blob: bdb162358d1d38336bccf89c8d65059e0e16d9c7 [file] [log] [blame]
David K. Bainbridgeb6f72c12017-08-22 13:22:23 -07001FROM maven:3-jdk-8-alpine as download
David K. Bainbridgee0982542017-08-22 10:58:49 -07002MAINTAINER Open Networking Foundation <info@opennetworking.org>
3
David K. Bainbridgeb6f72c12017-08-22 13:22:23 -07004#RUN apt-get update && apt-get install -y maven
5
6# The ENV settings must be replicated below as they are not shared between stages
7ENV DOWNLOAD_ROOT=/download
8
9# Build the applications
10RUN mkdir -p ${DOWNLOAD_ROOT}
11WORKDIR ${DOWNLOAD_ROOT}
12ADD config/dependencies.xml .
13RUN mvn dependency:copy -Dmdep.useBaseVersion=true -DoutputDirectory=${DOWNLOAD_ROOT} -Dsilent=true -f dependencies.xml
14
David K. Bainbridgea25df1c2017-09-07 14:00:29 -070015FROM onosproject/onos:1.10.6 as install
David K. Bainbridgeb6f72c12017-08-22 13:22:23 -070016MAINTAINER Open Networking Foundation <info@opennetworking.org>
17
18# The ENV settings must be replicated below as they are not shared between stages
David K. Bainbridgee0982542017-08-22 10:58:49 -070019ENV ONOS=/root/onos
David K. Bainbridgee0982542017-08-22 10:58:49 -070020ENV KARAF_VERSION=3.0.8
21ENV KARAF_ROOT=${ONOS}/apache-karaf-${KARAF_VERSION}
David K. Bainbridgeb6f72c12017-08-22 13:22:23 -070022ENV APPS_ROOT=${ONOS}/apps
David K. Bainbridgee0982542017-08-22 10:58:49 -070023ENV KARAF_M2=${KARAF_ROOT}/system
David K. Bainbridgeb6f72c12017-08-22 13:22:23 -070024ENV DOWNLOAD_ROOT=/download
David K. Bainbridgee0982542017-08-22 10:58:49 -070025ENV APP_INSTALL_ROOT=/expand
26
David K. Bainbridgeb6f72c12017-08-22 13:22:23 -070027# Copy the downloaded artifact to the install stage container
28COPY --from=download ${DOWNLOAD_ROOT} ${DOWNLOAD_ROOT}
David K. Bainbridge9f2ec3c2017-08-10 09:13:18 -070029
30# Install the applications
David K. Bainbridgeb6f72c12017-08-22 13:22:23 -070031COPY config/app-install.sh ./app-install.sh
David K. Bainbridgef87a5c82017-08-11 11:04:57 -070032RUN chmod 755 ./app-install.sh
33RUN ./app-install.sh
alshabib7db13562017-01-09 21:21:34 -080034
David K. Bainbridge9f2ec3c2017-08-10 09:13:18 -070035# Create the final image coping over the installed applications from the build stage
David K. Bainbridgea25df1c2017-09-07 14:00:29 -070036FROM onosproject/onos:1.10.6
David K. Bainbridgeb6f72c12017-08-22 13:22:23 -070037MAINTAINER Open Networking Foundation <info@opennetworking.org>
alshabib9fbb2232016-12-23 00:40:08 -080038
David K. Bainbridge138d5d62017-08-14 14:20:11 -070039# Install Key Store Options
40ENV 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}"
41
David K. Bainbridgeb6f72c12017-08-22 13:22:23 -070042# The ENV settings must be replicated below as they are not shared between stages
David K. Bainbridge9f2ec3c2017-08-10 09:13:18 -070043ENV ONOS=/root/onos
David K. Bainbridge6c0dc882017-08-17 09:57:10 -070044ENV KARAF_VERSION=3.0.8
David K. Bainbridge9f2ec3c2017-08-10 09:13:18 -070045ENV KARAF_ROOT=${ONOS}/apache-karaf-${KARAF_VERSION}
46ENV KARAF_M2=${KARAF_ROOT}/system
47ENV APPS_ROOT=${ONOS}/apps
Zsolt Haraszti3578a1c2017-01-10 15:29:02 -080048
David K. Bainbridgeb6f72c12017-08-22 13:22:23 -070049COPY --from=install ${KARAF_M2}/ ${KARAF_M2}/
David K. Bainbridge9f2ec3c2017-08-10 09:13:18 -070050RUN echo "${KARAF_M2} ${APPS_ROOT}"
David K. Bainbridgeb6f72c12017-08-22 13:22:23 -070051COPY --from=install ${APPS_ROOT}/ ${APPS_ROOT}/
alshabib9fbb2232016-12-23 00:40:08 -080052COPY config/netcfg.json $KARAF_ROOT/../config/network-cfg.json
schowdhurycbbe3272017-07-03 17:12:35 -070053
David K. Bainbridge138d5d62017-08-14 14:20:11 -070054RUN touch $ONOS/apps/org.onosproject.hostprovider/active
David K. Bainbridge9f2ec3c2017-08-10 09:13:18 -070055RUN touch $ONOS/apps/org.onosproject.openflow-base/active
56
schowdhurycbbe3272017-07-03 17:12:35 -070057# Create ONOS Key Directory
58RUN mkdir -p /home/sdn/wiki
59COPY onos_cfg/ /home/sdn/wiki
David K. Bainbridge9f2ec3c2017-08-10 09:13:18 -070060