blob: 967077602a6d7ccb930726518fe95adbdbc895f5 [file] [log] [blame]
Max Chu4d0079a2017-09-14 10:33:09 -07001# <%= name %>
2FROM xosproject/xos-gui-extension-builder:candidate
3
4# Set environment vars
5ENV CODE_SOURCE .
6ENV CODE_DEST /var/www
7ENV VHOST /var/www/dist
8
9# Add the app deps
10COPY ${CODE_SOURCE}/package.json ${CODE_DEST}/package.json
11COPY ${CODE_SOURCE}/typings.json ${CODE_DEST}/typings.json
12
13# Install Deps
14WORKDIR ${CODE_DEST}
15RUN npm install
16RUN npm run typings
17
18# Build the app
19COPY ${CODE_SOURCE}/conf ${CODE_DEST}/conf
20COPY ${CODE_SOURCE}/gulp_tasks ${CODE_DEST}/gulp_tasks
21COPY ${CODE_SOURCE}/src ${CODE_DEST}/src
22COPY ${CODE_SOURCE}/gulpfile.js ${CODE_DEST}/gulpfile.js
23COPY ${CODE_SOURCE}/tsconfig.json ${CODE_DEST}/tsconfig.json
24COPY ${CODE_SOURCE}/tslint.json ${CODE_DEST}/tslint.json
25
26# Label image
27ARG org_label_schema_schema_version=1.0
28ARG org_label_schema_name=xos-tosca
29ARG org_label_schema_version=unknown
30ARG org_label_schema_vcs_url=unknown
31ARG org_label_schema_vcs_ref=unknown
32ARG org_label_schema_build_date=unknown
33ARG org_opencord_vcs_commit_date=unknown
34ARG org_opencord_component_xos_gui_vcs_ref=unknown
35ARG org_opencord_component_xos_gui_vcs_url=unknown
36ARG org_opencord_component_xos_gui_version=unknown
37
38LABEL org.label-schema.schema-version=$org_label_schema_schema_version \
39 org.label-schema.name=$org_label_schema_name \
40 org.label-schema.version=$org_label_schema_version \
41 org.label-schema.vcs-url=$org_label_schema_vcs_url \
42 org.label-schema.vcs-ref=$org_label_schema_vcs_ref \
43 org.label-schema.build-date=$org_label_schema_build_date \
44 org.opencord.vcs-commit-date=$org_opencord_vcs_commit_date \
45 org.opencord.component.xos-gui.vcs-ref=$org_opencord_component_xos_gui_vcs_ref \
46 org.opencord.component.xos-gui.vcs-url=$org_opencord_component_xos_gui_vcs_url \
47 org.opencord.component.xos-gui.version=$org_opencord_component_xos_gui_version
48
49RUN npm run build