blob: 053a1810f854742589d21f0133aa89aff2e0adb3 [file] [log] [blame]
trevor tao6fda0ed2019-05-05 14:07:15 +08001
2# Copyright 2017-present Open Networking Foundation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16
17# docker build -f Dockerfile.xos-gui-builder.arm64 -t xosproject/xos-gui-builder:candidate .
18# Before docker build the Dockerfile of xos-gui:
19# docker tag xosproject/xos-gui-builder:candidate xosproject/xos-gui-builder:1.0.0
20
21FROM node:8.16.0-stretch
22
23# Set environment vars
24ENV CODE_SOURCE .
25ENV CODE_DEST /var/www
26ENV QT_QPA_PLATFORM minimal
27
28RUN mkdir -p ${CODE_DEST}
29
30COPY ${CODE_SOURCE}/package.json ${CODE_SOURCE}/typings.json ${CODE_DEST}/
31
32#Complie and install phantomjs and its dependent packages
33RUN apt-get update \
34 && apt-get remove -y libssl-dev \
35 && apt-get install -y build-essential g++ flex bison \
36 gperf ruby perl libsqlite3-dev libfontconfig1-dev libicu-dev \
37 libfreetype6 libpng-dev libjpeg-dev libx11-dev libxext-dev zip libssl1.0-dev \
38 && git clone git://github.com/ariya/phantomjs.git \
39 && cd phantomjs \
40 && git checkout 2.1 \
41 && git submodule init \
42 && git submodule update \
43 && cd /phantomjs \
44 && python ./build.py --qt-config "-I /usr/include/openssl-1.0/ -L/usr/lib/openssl-1.0/" \
45 && apt-get update && apt-get install -y phantomjs
46
47WORKDIR ${CODE_DEST}
48RUN npm install \
49 && npm run typings \
50 && apt-get remove -y libssl1.0-dev && apt-get install -y libssl-dev
51
52ARG org_label_schema_schema_version=1.0
53ARG org_label_schema_name=xos-gui-builder
54ARG org_label_schema_version=unknown
55ARG org_label_schema_vcs_url=unknown
56ARG org_label_schema_vcs_ref=unknown
57ARG org_label_schema_build_date=unknown
58ARG org_opencord_vcs_commit_date=unknown
59
60LABEL org.label-schema.schema-version=$org_label_schema_schema_version \
61 org.label-schema.name=$org_label_schema_name \
62 org.label-schema.version=$org_label_schema_version \
63 org.label-schema.vcs-url=$org_label_schema_vcs_url \
64 org.label-schema.vcs-ref=$org_label_schema_vcs_ref \
65 org.label-schema.build-date=$org_label_schema_build_date \
66 org.opencord.vcs-commit-date=$org_opencord_vcs_commit_date
67