Julien Barbot | bfa1bbe | 2018-08-20 18:42:48 +0200 | [diff] [blame] | 1 | # ============LICENSE_START======================================================= |
| 2 | # org.onap.dcae |
| 3 | # ================================================================================ |
| 4 | # Copyright (c) 2018 Cisco Systems. All rights reserved. |
| 5 | # ================================================================================ |
| 6 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | # you may not use this file except in compliance with the License. |
| 8 | # You may obtain a copy of the License at |
| 9 | # |
| 10 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | # |
| 12 | # Unless required by applicable law or agreed to in writing, software |
| 13 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | # See the License for the specific language governing permissions and |
| 16 | # limitations under the License. |
| 17 | # ============LICENSE_END========================================================= |
| 18 | |
| 19 | FROM centos:7.5.1804 as build |
| 20 | |
krickwix | dbac6f2 | 2018-10-22 12:56:05 +0200 | [diff] [blame] | 21 | ARG PNDARELEASE=release/5.0 |
Julien Barbot | 592a556 | 2018-09-20 17:20:24 +0200 | [diff] [blame] | 22 | # Can be HDP or CDH |
| 23 | ARG HADOOPDIST=HDP |
| 24 | |
Julien Barbot | bfa1bbe | 2018-08-20 18:42:48 +0200 | [diff] [blame] | 25 | RUN yum clean all && rm -rf /var/cache/yum/* && yum install gettext git -y |
| 26 | |
| 27 | RUN git clone -b $PNDARELEASE https://github.com/pndaproject/pnda.git |
| 28 | |
Donald Hunter | 363933a | 2019-02-27 15:10:54 +0000 | [diff] [blame^] | 29 | COPY pnda-5.0-maint.patch / |
| 30 | WORKDIR /pnda |
| 31 | RUN git apply /pnda-5.0-maint.patch |
| 32 | |
Julien Barbot | bfa1bbe | 2018-08-20 18:42:48 +0200 | [diff] [blame] | 33 | WORKDIR /pnda/mirror |
krickwix | dbac6f2 | 2018-10-22 12:56:05 +0200 | [diff] [blame] | 34 | # Add the -r flag to mirror rpm packages |
| 35 | RUN ./create_mirror.sh -d $HADOOPDIST -r |
Julien Barbot | bfa1bbe | 2018-08-20 18:42:48 +0200 | [diff] [blame] | 36 | |
| 37 | WORKDIR /pnda/build |
| 38 | RUN ./install-build-tools.sh |
| 39 | |
| 40 | RUN yum install bzip2 make which -y |
| 41 | RUN source ./set-pnda-env.sh \ |
krickwix | dbac6f2 | 2018-10-22 12:56:05 +0200 | [diff] [blame] | 42 | && PARALLEL="--jobs 1" ./build-pnda.sh RELEASE $PNDARELEASE $HADOOPDIST |
Julien Barbot | bfa1bbe | 2018-08-20 18:42:48 +0200 | [diff] [blame] | 43 | |
| 44 | FROM nginx:alpine |
| 45 | |
| 46 | COPY --from=build /pnda/mirror/mirror-dist /usr/share/nginx/html/ |
| 47 | COPY --from=build /pnda/build/pnda-dist /usr/share/nginx/html/ |