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 | 23b00b3 | 2020-09-04 13:02:08 -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 | |
Lasse Kaihlavirta | 110bb11 | 2020-12-15 12:00:06 +0200 | [diff] [blame] | 20 | LABEL maintainer="CCSDK Team (onap-ccsdk@lists.onap.org)" |
Dan Timoney | 23b00b3 | 2020-09-04 13:02:08 -0400 | [diff] [blame] | 21 | USER root |
Matej Klotton | c6f21be | 2019-06-28 17:33:36 +0200 | [diff] [blame] | 22 | |
Timoney, Dan (dt5972) | 21821db | 2018-03-13 19:26:40 -0400 | [diff] [blame] | 23 | ENV SDNC_CONFIG_DIR /opt/onap/ccsdk/data/properties |
highstreetherbert | cc6dcf6 | 2020-08-21 13:57:10 +0200 | [diff] [blame] | 24 | ENV CCSDKFEATUREVERSION ${ccsdk.features.version} |
Timoney, Dan (dt5972) | e14a020 | 2018-06-22 17:05:16 -0400 | [diff] [blame] | 25 | ENV CCSDK_SLI_CORE_REPO mvn:org.onap.ccsdk.sli.core/ccsdk-sli-core-all/${ccsdk.sli.core.version}/xml/features |
| 26 | 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] | 27 | 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] | 28 | ENV CCSDK_FEATURES_SDNR_WT_REPO mvn:org.onap.ccsdk.features.sdnr.wt/sdnr-wt-feature-aggregator/${ccsdk.features.version}/xml/features |
Dan Timoney | 1f4e903 | 2021-01-25 14:47:00 -0500 | [diff] [blame^] | 29 | ENV CCSDK_FEATURES_SDNR_NORTHBOUND_REPO mvn:org.onap.ccsdk.features.sdnr.northbound/sdnr-northbound-all/${ccsdk.features.version}/xml/features |
Timoney, Dan (dt5972) | e14a020 | 2018-06-22 17:05:16 -0400 | [diff] [blame] | 30 | ENV CCSDK_SLI_NORTHBOUND_REPO mvn:org.onap.ccsdk.sli.northbound/ccsdk-sli-northbound-all/${ccsdk.sli.northbound.version}/xml/features |
| 31 | 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] | 32 | 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] | 33 | ENV ANSIBLE_GPG_KEY ${ansible.gpg.key} |
Timoney, Dan (dt5972) | aa9d825 | 2019-02-04 18:02:21 -0500 | [diff] [blame] | 34 | ENV ODL_BOOT_FEATURES_EXTRA ${odl.boot.features.extra} |
Timoney, Dan (dt5972) | be94cc1 | 2018-07-02 18:02:35 -0400 | [diff] [blame] | 35 | |
Timoney, Dan (dt5972) | ffa8f37 | 2019-05-07 10:40:24 -0400 | [diff] [blame] | 36 | # Install sudo and IP utilities |
Matej Klotton | c6f21be | 2019-06-28 17:33:36 +0200 | [diff] [blame] | 37 | RUN apk update && apk --no-cache add sudo iputils openssl |
Timoney, Dan (dt5972) | ffa8f37 | 2019-05-07 10:40:24 -0400 | [diff] [blame] | 38 | |
Timoney, Dan (dt5972) | 53cb687 | 2019-07-30 12:13:33 -0400 | [diff] [blame] | 39 | |
Dan Timoney | 1f4e903 | 2021-01-25 14:47:00 -0500 | [diff] [blame^] | 40 | |
Timoney, Dan (dt5972) | ffa8f37 | 2019-05-07 10:40:24 -0400 | [diff] [blame] | 41 | # Enable wheel group |
| 42 | RUN sed -e 's/# %wheel ALL=(ALL) NOPASSWD: ALL/%wheel ALL=(ALL) NOPASSWD: ALL/g' -i /etc/sudoers |
| 43 | |
Timoney, Dan (dt5972) | 53cb687 | 2019-07-30 12:13:33 -0400 | [diff] [blame] | 44 | # Create odl user |
| 45 | RUN addgroup -S odl && adduser -S odl -G odl |
| 46 | RUN addgroup odl wheel |
| 47 | |
Matej Klotton | c6f21be | 2019-06-28 17:33:36 +0200 | [diff] [blame] | 48 | COPY --from=stage0 --chown=odl:odl /opt /opt |
Timoney, Dan (dt5972) | e14a020 | 2018-06-22 17:05:16 -0400 | [diff] [blame] | 49 | |
Matej Klotton | c6f21be | 2019-06-28 17:33:36 +0200 | [diff] [blame] | 50 | # Add CCSDK repositories to boot repositories |
| 51 | RUN cp $ODL_HOME/etc/org.apache.karaf.features.cfg $ODL_HOME/etc/org.apache.karaf.features.cfg.orig |
Dan Timoney | 1f4e903 | 2021-01-25 14:47:00 -0500 | [diff] [blame^] | 52 | 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}, ${CCSDK_FEATURES_SDNR_NORTHBOUND_REPO} |" $ODL_HOME/etc/org.apache.karaf.features.cfg |
Matej Klotton | c6f21be | 2019-06-28 17:33:36 +0200 | [diff] [blame] | 53 | 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] | 54 | |
Timoney, Dan (dt5972) | 38e175f | 2019-02-21 14:57:34 -0500 | [diff] [blame] | 55 | USER odl |
Timoney, Dan (dt5972) | e14a020 | 2018-06-22 17:05:16 -0400 | [diff] [blame] | 56 | ENTRYPOINT /opt/onap/ccsdk/bin/startODL.sh |