Matej Klotton | c6f21be | 2019-06-28 17:33:36 +0200 | [diff] [blame] | 1 | # Prepare stage for multistage image build |
| 2 | ## START OF STAGE0 ## |
| 3 | FROM ${base.image.name}:${project.docker.latestfulltag.version} AS stage0 |
| 4 | |
| 5 | ENV JAVA_HOME /usr/lib/jvm/java-1.8-openjdk |
| 6 | ENV ODL_HOME /opt/opendaylight |
| 7 | |
| 8 | # copy the opendaylight credentials |
| 9 | COPY idmlight.db.mv.db $ODL_HOME/data |
| 10 | |
| 11 | # copy CCSDK mvn artifacts to ODL repository |
| 12 | COPY system /tmp/system |
| 13 | RUN rsync -a /tmp/system $ODL_HOME |
| 14 | |
| 15 | # copy deliverables to opt |
| 16 | COPY opt /opt |
| 17 | COPY org.ops4j.pax.logging.cfg $ODL_HOME/etc/org.ops4j.pax.logging.cfg |
| 18 | ## END OF STAGE0 ## |
| 19 | |
| 20 | |
Timoney, Dan (dt5972) | 268c4ba | 2019-02-12 14:35:10 -0500 | [diff] [blame] | 21 | FROM ${base.image.name}:${project.docker.latestfulltag.version} |
Matej Klotton | c6f21be | 2019-06-28 17:33:36 +0200 | [diff] [blame] | 22 | |
Timoney, Dan (dt5972) | e14a020 | 2018-06-22 17:05:16 -0400 | [diff] [blame] | 23 | MAINTAINER CCSDK Team (onap-ccsdk@lists.onap.org) |
Matej Klotton | c6f21be | 2019-06-28 17:33:36 +0200 | [diff] [blame] | 24 | |
Timoney, Dan (dt5972) | b1ac725 | 2018-12-14 13:00:43 -0500 | [diff] [blame] | 25 | ENV JAVA_HOME /usr/lib/jvm/java-1.8-openjdk |
Timoney, Dan (dt5972) | e14a020 | 2018-06-22 17:05:16 -0400 | [diff] [blame] | 26 | ENV ODL_HOME /opt/opendaylight |
Timoney, Dan (dt5972) | 21821db | 2018-03-13 19:26:40 -0400 | [diff] [blame] | 27 | ENV SDNC_CONFIG_DIR /opt/onap/ccsdk/data/properties |
Timoney, Dan (dt5972) | e14a020 | 2018-06-22 17:05:16 -0400 | [diff] [blame] | 28 | ENV CCSDK_SLI_CORE_REPO mvn:org.onap.ccsdk.sli.core/ccsdk-sli-core-all/${ccsdk.sli.core.version}/xml/features |
| 29 | ENV CCSDK_SLI_ADAPTORS_REPO mvn:org.onap.ccsdk.sli.adaptors/ccsdk-sli-adaptors-all/${ccsdk.sli.adaptors.version}/xml/features |
Alexis de Talhouƫt | 268c5e1 | 2018-09-12 15:27:33 -0400 | [diff] [blame] | 30 | ENV CCSDK_FEATURES_REPO mvn:org.onap.ccsdk.features/ccsdk-features-all/${ccsdk.features.version}/xml/features |
Herbert Eiselt | 4b054f9 | 2019-03-26 20:40:49 +0100 | [diff] [blame] | 31 | ENV CCSDK_FEATURES_SDNR_WT_REPO mvn:org.onap.ccsdk.features.sdnr.wt/sdnr-wt-feature-aggregator/${ccsdk.features.version}/xml/features |
Timoney, Dan (dt5972) | e14a020 | 2018-06-22 17:05:16 -0400 | [diff] [blame] | 32 | ENV CCSDK_SLI_NORTHBOUND_REPO mvn:org.onap.ccsdk.sli.northbound/ccsdk-sli-northbound-all/${ccsdk.sli.northbound.version}/xml/features |
| 33 | ENV CCSDK_SLI_PLUGINS_REPO mvn:org.onap.ccsdk.sli.plugins/ccsdk-sli-plugins-all/${ccsdk.sli.plugins.version}/xml/features |
RehanRaza | 600b944 | 2020-08-24 15:43:29 +0200 | [diff] [blame^] | 34 | ENV A1ADAPTER_NORTHBOUND_REPO mvn:org.onap.ccsdk.oran/a1-adapter-northbound/${ccsdk.oran.a1adapter.version}/xml/features |
Timoney, Dan (dt5972) | be94cc1 | 2018-07-02 18:02:35 -0400 | [diff] [blame] | 35 | ENV ANSIBLE_GPG_KEY ${ansible.gpg.key} |
Timoney, Dan (dt5972) | aa9d825 | 2019-02-04 18:02:21 -0500 | [diff] [blame] | 36 | ENV ODL_BOOT_FEATURES_EXTRA ${odl.boot.features.extra} |
Timoney, Dan (dt5972) | be94cc1 | 2018-07-02 18:02:35 -0400 | [diff] [blame] | 37 | |
Timoney, Dan (dt5972) | ffa8f37 | 2019-05-07 10:40:24 -0400 | [diff] [blame] | 38 | # Install sudo and IP utilities |
Matej Klotton | c6f21be | 2019-06-28 17:33:36 +0200 | [diff] [blame] | 39 | RUN apk update && apk --no-cache add sudo iputils openssl |
Timoney, Dan (dt5972) | ffa8f37 | 2019-05-07 10:40:24 -0400 | [diff] [blame] | 40 | |
Timoney, Dan (dt5972) | 53cb687 | 2019-07-30 12:13:33 -0400 | [diff] [blame] | 41 | |
Timoney, Dan (dt5972) | ffa8f37 | 2019-05-07 10:40:24 -0400 | [diff] [blame] | 42 | # Enable wheel group |
| 43 | RUN sed -e 's/# %wheel ALL=(ALL) NOPASSWD: ALL/%wheel ALL=(ALL) NOPASSWD: ALL/g' -i /etc/sudoers |
| 44 | |
Timoney, Dan (dt5972) | 53cb687 | 2019-07-30 12:13:33 -0400 | [diff] [blame] | 45 | # Create odl user |
| 46 | RUN addgroup -S odl && adduser -S odl -G odl |
| 47 | RUN addgroup odl wheel |
| 48 | |
Matej Klotton | c6f21be | 2019-06-28 17:33:36 +0200 | [diff] [blame] | 49 | COPY --from=stage0 --chown=odl:odl /opt /opt |
Timoney, Dan (dt5972) | e14a020 | 2018-06-22 17:05:16 -0400 | [diff] [blame] | 50 | |
Matej Klotton | c6f21be | 2019-06-28 17:33:36 +0200 | [diff] [blame] | 51 | # Add CCSDK repositories to boot repositories |
| 52 | RUN cp $ODL_HOME/etc/org.apache.karaf.features.cfg $ODL_HOME/etc/org.apache.karaf.features.cfg.orig |
RehanRaza | 600b944 | 2020-08-24 15:43:29 +0200 | [diff] [blame^] | 53 | RUN sed -i -e "\|featuresRepositories|s|$|, ${CCSDK_SLI_CORE_REPO}, ${CCSDK_SLI_ADAPTORS_REPO}, ${CCSDK_SLI_NORTHBOUND_REPO}, ${CCSDK_SLI_PLUGINS_REPO}, ${CCSDK_FEATURES_REPO}, ${A1ADAPTER_NORTHBOUND_REPO}|" $ODL_HOME/etc/org.apache.karaf.features.cfg |
Matej Klotton | c6f21be | 2019-06-28 17:33:36 +0200 | [diff] [blame] | 54 | RUN sed -i -e "\|featuresBoot[^a-zA-Z]|s|$|,${ODL_BOOT_FEATURES_EXTRA}|" $ODL_HOME/etc/org.apache.karaf.features.cfg |
Marcus G K Williams | dc299ed | 2017-09-14 15:15:45 -0700 | [diff] [blame] | 55 | |
Timoney, Dan (dt5972) | 38e175f | 2019-02-21 14:57:34 -0500 | [diff] [blame] | 56 | USER odl |
Timoney, Dan (dt5972) | e14a020 | 2018-06-22 17:05:16 -0400 | [diff] [blame] | 57 | ENTRYPOINT /opt/onap/ccsdk/bin/startODL.sh |
Dan Timoney | 471dafa | 2017-08-21 14:44:05 -0400 | [diff] [blame] | 58 | EXPOSE 8181 |