blob: 3fdcfee3b73791c9d4cec4e3b3c036ba18d75079 [file] [log] [blame]
Julien Barbotbfa1bbe2018-08-20 18:42:48 +02001# ============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
19FROM centos:7.5.1804 as build
20
21ARG PNDARELEASE=develop
Julien Barbot592a5562018-09-20 17:20:24 +020022# Can be HDP or CDH
23ARG HADOOPDIST=HDP
24
Julien Barbotbfa1bbe2018-08-20 18:42:48 +020025
26RUN yum clean all && rm -rf /var/cache/yum/* && yum install gettext git -y
27
28RUN git clone -b $PNDARELEASE https://github.com/pndaproject/pnda.git
29
30WORKDIR /pnda/mirror
Julien Barbot43f93c02018-08-31 11:13:37 +020031RUN ./create_mirror.sh HDP
Julien Barbotbfa1bbe2018-08-20 18:42:48 +020032
33WORKDIR /pnda/build
34RUN ./install-build-tools.sh
35
36RUN yum install bzip2 make which -y
37RUN source ./set-pnda-env.sh \
Julien Barbot592a5562018-09-20 17:20:24 +020038 && PARALLEL="--jobs 1" ./build-pnda.sh BRANCH $PNDARELEASE $HADOOPDIST
Julien Barbotbfa1bbe2018-08-20 18:42:48 +020039
40FROM nginx:alpine
41
42COPY --from=build /pnda/mirror/mirror-dist /usr/share/nginx/html/
43COPY --from=build /pnda/build/pnda-dist /usr/share/nginx/html/