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 | |
Matej Klotton | c6f21be | 2019-06-28 17:33:36 +0200 | [diff] [blame] | 5 | # copy the opendaylight credentials |
Dan Timoney | 0b9839e | 2020-09-01 16:21:53 -0400 | [diff] [blame] | 6 | USER ROOT |
Matej Klotton | c6f21be | 2019-06-28 17:33:36 +0200 | [diff] [blame] | 7 | COPY idmlight.db.mv.db $ODL_HOME/data |
| 8 | |
| 9 | # copy CCSDK mvn artifacts to ODL repository |
| 10 | COPY system /tmp/system |
| 11 | RUN rsync -a /tmp/system $ODL_HOME |
| 12 | |
| 13 | # copy deliverables to opt |
| 14 | COPY opt /opt |
| 15 | COPY org.ops4j.pax.logging.cfg $ODL_HOME/etc/org.ops4j.pax.logging.cfg |
| 16 | ## END OF STAGE0 ## |
| 17 | |
Timoney, Dan (dt5972) | 268c4ba | 2019-02-12 14:35:10 -0500 | [diff] [blame] | 18 | FROM ${base.image.name}:${project.docker.latestfulltag.version} |
Matej Klotton | c6f21be | 2019-06-28 17:33:36 +0200 | [diff] [blame] | 19 | |
Michael Dürre | 1a75e48 | 2020-09-01 13:04:25 +0200 | [diff] [blame] | 20 | LABEL maintainer="CCSDK Team (onap-ccsdk@lists.onap.org)" |
Matej Klotton | c6f21be | 2019-06-28 17:33:36 +0200 | [diff] [blame] | 21 | |
Timoney, Dan (dt5972) | 21821db | 2018-03-13 19:26:40 -0400 | [diff] [blame] | 22 | ENV SDNC_CONFIG_DIR /opt/onap/ccsdk/data/properties |
highstreetherbert | cc6dcf6 | 2020-08-21 13:57:10 +0200 | [diff] [blame] | 23 | ENV CCSDKFEATUREVERSION ${ccsdk.features.version} |
Timoney, Dan (dt5972) | e14a020 | 2018-06-22 17:05:16 -0400 | [diff] [blame] | 24 | ENV CCSDK_SLI_CORE_REPO mvn:org.onap.ccsdk.sli.core/ccsdk-sli-core-all/${ccsdk.sli.core.version}/xml/features |
| 25 | 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] | 26 | 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] | 27 | 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] | 28 | ENV CCSDK_SLI_NORTHBOUND_REPO mvn:org.onap.ccsdk.sli.northbound/ccsdk-sli-northbound-all/${ccsdk.sli.northbound.version}/xml/features |
| 29 | 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] | 30 | 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] | 31 | ENV ANSIBLE_GPG_KEY ${ansible.gpg.key} |
Timoney, Dan (dt5972) | aa9d825 | 2019-02-04 18:02:21 -0500 | [diff] [blame] | 32 | ENV ODL_BOOT_FEATURES_EXTRA ${odl.boot.features.extra} |
Timoney, Dan (dt5972) | be94cc1 | 2018-07-02 18:02:35 -0400 | [diff] [blame] | 33 | |
Timoney, Dan (dt5972) | ffa8f37 | 2019-05-07 10:40:24 -0400 | [diff] [blame] | 34 | # Install sudo and IP utilities |
Matej Klotton | c6f21be | 2019-06-28 17:33:36 +0200 | [diff] [blame] | 35 | RUN apk update && apk --no-cache add sudo iputils openssl |
Timoney, Dan (dt5972) | ffa8f37 | 2019-05-07 10:40:24 -0400 | [diff] [blame] | 36 | |
Timoney, Dan (dt5972) | 53cb687 | 2019-07-30 12:13:33 -0400 | [diff] [blame] | 37 | |
Timoney, Dan (dt5972) | ffa8f37 | 2019-05-07 10:40:24 -0400 | [diff] [blame] | 38 | # Enable wheel group |
| 39 | RUN sed -e 's/# %wheel ALL=(ALL) NOPASSWD: ALL/%wheel ALL=(ALL) NOPASSWD: ALL/g' -i /etc/sudoers |
| 40 | |
Timoney, Dan (dt5972) | 53cb687 | 2019-07-30 12:13:33 -0400 | [diff] [blame] | 41 | # Create odl user |
| 42 | RUN addgroup -S odl && adduser -S odl -G odl |
| 43 | RUN addgroup odl wheel |
| 44 | |
Matej Klotton | c6f21be | 2019-06-28 17:33:36 +0200 | [diff] [blame] | 45 | COPY --from=stage0 --chown=odl:odl /opt /opt |
Timoney, Dan (dt5972) | e14a020 | 2018-06-22 17:05:16 -0400 | [diff] [blame] | 46 | |
Matej Klotton | c6f21be | 2019-06-28 17:33:36 +0200 | [diff] [blame] | 47 | # Add CCSDK repositories to boot repositories |
| 48 | 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] | 49 | 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] | 50 | 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] | 51 | |
Timoney, Dan (dt5972) | 38e175f | 2019-02-21 14:57:34 -0500 | [diff] [blame] | 52 | USER odl |
Timoney, Dan (dt5972) | e14a020 | 2018-06-22 17:05:16 -0400 | [diff] [blame] | 53 | ENTRYPOINT /opt/onap/ccsdk/bin/startODL.sh |