Max Chu | 3ca3e20 | 2017-09-14 10:33:09 -0700 | [diff] [blame] | 1 | # <%= name %> |
| 2 | FROM xosproject/xos-gui-extension-builder:candidate |
| 3 | |
| 4 | # Set environment vars |
| 5 | ENV CODE_SOURCE . |
| 6 | ENV CODE_DEST /var/www |
| 7 | ENV VHOST /var/www/dist |
| 8 | |
| 9 | # Add the app deps |
| 10 | COPY ${CODE_SOURCE}/package.json ${CODE_DEST}/package.json |
| 11 | COPY ${CODE_SOURCE}/typings.json ${CODE_DEST}/typings.json |
| 12 | |
| 13 | # Install Deps |
| 14 | WORKDIR ${CODE_DEST} |
| 15 | RUN npm install |
| 16 | RUN npm run typings |
| 17 | |
| 18 | # Build the app |
| 19 | COPY ${CODE_SOURCE}/conf ${CODE_DEST}/conf |
| 20 | COPY ${CODE_SOURCE}/gulp_tasks ${CODE_DEST}/gulp_tasks |
| 21 | COPY ${CODE_SOURCE}/src ${CODE_DEST}/src |
| 22 | COPY ${CODE_SOURCE}/gulpfile.js ${CODE_DEST}/gulpfile.js |
| 23 | COPY ${CODE_SOURCE}/tsconfig.json ${CODE_DEST}/tsconfig.json |
| 24 | COPY ${CODE_SOURCE}/tslint.json ${CODE_DEST}/tslint.json |
| 25 | |
| 26 | # Label image |
| 27 | ARG org_label_schema_schema_version=1.0 |
| 28 | ARG org_label_schema_name=xos-tosca |
| 29 | ARG org_label_schema_version=unknown |
| 30 | ARG org_label_schema_vcs_url=unknown |
| 31 | ARG org_label_schema_vcs_ref=unknown |
| 32 | ARG org_label_schema_build_date=unknown |
| 33 | ARG org_opencord_vcs_commit_date=unknown |
| 34 | ARG org_opencord_component_xos_gui_vcs_ref=unknown |
| 35 | ARG org_opencord_component_xos_gui_vcs_url=unknown |
| 36 | ARG org_opencord_component_xos_gui_version=unknown |
| 37 | |
| 38 | LABEL 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 | |
| 49 | RUN npm run build |