1 # Prepare stage for multistage image build
3 FROM onap/ccsdk-alpine-j11-image:${project.docker.latestfulltag.version} AS stage0
6 ENV ODL_HOME /opt/opendaylight/current
8 # copy the opendaylight tar and expand
9 COPY ${odl.karaf.artifactId}-${ccsdk.opendaylight.version}.tar.gz /tmp/
10 RUN mkdir -p /opt/odl \
11 && tar zxvf /tmp/${odl.karaf.artifactId}-${ccsdk.opendaylight.version}.tar.gz --directory /opt/odl \
12 && rm -rf /tmp/${odl.karaf.artifactId}-${ccsdk.opendaylight.version}.tar.gz \
13 && mv /opt/odl/${odl.karaf.artifactId}-${ccsdk.opendaylight.version} /opt/opendaylight \
14 && ln -s /opt/opendaylight /opt/opendaylight/${odl.karaf.artifactId}-${ccsdk.opendaylight.version} \
15 && ln -s /opt/opendaylight /opt/opendaylight/current
17 # Patch some opendaylight artifacts
18 COPY system $ODL_HOME/system
19 # Add missing scripts see SDNC-1056
20 #COPY configure_cluster.sh configure-cluster-ipdetect.sh custom_shard_config.txt set_persistence.sh $ODL_HOME/bin/
21 #RUN chmod 755 $ODL_HOME/bin/configure_cluster.sh $ODL_HOME/bin/configure-cluster-ipdetect.sh $ODL_HOME/bin/set_persistence.sh $ODL_HOME/bin/custom_shard_config.txt
26 ## This will create actual image
27 FROM onap/ccsdk-alpine-j11-image:${project.docker.latestfulltag.version}
28 MAINTAINER CCSDK Team (onap-ccsdk@lists.onap.org)
31 ENV ODL_HOME /opt/opendaylight/current
33 COPY --from=stage0 /opt /opt
35 # ENTRYPOINT exec /opt/opendaylight/bin/karaf