blob: 55c4a7ceecaa000a14f8eb30a75e8950a53eb54a [file] [log] [blame]
FROM onosproject/onos:1.10.6 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.8
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.3.0 \
CONFIG_VERSION=1.3.0 \
IGMP_VERSION=1.3.0 \
IGMP_PROXY_VERSION=1.1.0 \
MCAST_VERSION=1.3.0 \
OLT_VERSION=1.3.0 \
SADIS_VERSION=1.1.0 \
VTN_VERSION=1.3.0 \
L2_DHCP_RELAY_VERSION=1.1.0
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.10.6
# Install Key Store Options
ENV 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}"
ENV ONOS=/root/onos
ENV KARAF_VERSION=3.0.8
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.hostprovider/active
RUN touch $ONOS/apps/org.onosproject.openflow-base/active
RUN touch $ONOS/apps/org.onosproject.openflow-base/active
# Create ONOS Key Directory
RUN mkdir -p /home/sdn/wiki
COPY docker/onos_cfg/ /home/sdn/wiki