Zack Williams | cb3a7b4 | 2017-04-15 17:07:18 -0700 | [diff] [blame] | 1 | # xosproject/xos-gui |
Matteo Scandolo | 57aee47 | 2018-06-28 15:24:42 -0700 | [diff] [blame] | 2 | # docker build -f Dockerfile -t xosproject/xos-gui:candidate . |
Matteo Scandolo | d819c92 | 2016-12-02 14:06:14 -0800 | [diff] [blame] | 3 | |
Matteo Scandolo | d0e21df | 2017-11-16 10:17:12 -0800 | [diff] [blame] | 4 | # xos-gui-base container |
Matteo Scandolo | bddf31d | 2019-05-17 15:54:21 -0700 | [diff] [blame] | 5 | FROM xosproject/xos-gui-builder:1.0.5 as xos-gui-base |
Matteo Scandolo | d0e21df | 2017-11-16 10:17:12 -0800 | [diff] [blame] | 6 | |
Zack Williams | ca68f35 | 2017-04-27 20:17:18 -0700 | [diff] [blame] | 7 | ENV CODE_SOURCE . |
| 8 | ENV CODE_DEST /var/www |
| 9 | ENV VHOST /var/www/dist |
| 10 | |
Zack Williams | ca68f35 | 2017-04-27 20:17:18 -0700 | [diff] [blame] | 11 | COPY ${CODE_SOURCE}/package.json \ |
| 12 | ${CODE_SOURCE}/typings.json \ |
| 13 | ${CODE_SOURCE}/gulpfile.js \ |
| 14 | ${CODE_SOURCE}/tsconfig.json \ |
| 15 | ${CODE_SOURCE}/tslint.json \ |
| 16 | ${CODE_DEST}/ |
| 17 | COPY ${CODE_SOURCE}/conf/ ${CODE_DEST}/conf/ |
| 18 | COPY ${CODE_SOURCE}/gulp_tasks/ ${CODE_DEST}/gulp_tasks/ |
| 19 | COPY ${CODE_SOURCE}/src/ ${CODE_DEST}/src/ |
| 20 | |
Zack Williams | ca68f35 | 2017-04-27 20:17:18 -0700 | [diff] [blame] | 21 | WORKDIR ${CODE_DEST} |
| 22 | RUN npm install \ |
| 23 | && npm run typings \ |
Matteo Scandolo | 02784ea | 2017-10-31 10:07:40 +0100 | [diff] [blame] | 24 | && npm run build |
| 25 | |
| 26 | |
Matteo Scandolo | d0e21df | 2017-11-16 10:17:12 -0800 | [diff] [blame] | 27 | # xos-gui container |
Andy Bavier | 8a6be4c | 2018-06-28 13:11:17 -0700 | [diff] [blame] | 28 | FROM nginx:1.13 |
Matteo Scandolo | 02784ea | 2017-10-31 10:07:40 +0100 | [diff] [blame] | 29 | |
| 30 | ENV CODE_SOURCE . |
| 31 | ENV VHOST /var/www/dist |
| 32 | |
| 33 | WORKDIR ${VHOST} |
| 34 | |
Matteo Scandolo | 02784ea | 2017-10-31 10:07:40 +0100 | [diff] [blame] | 35 | RUN mkdir -p /var/log/nginx/log |
Zack Williams | ca68f35 | 2017-04-27 20:17:18 -0700 | [diff] [blame] | 36 | |
Zack Williams | ca68f35 | 2017-04-27 20:17:18 -0700 | [diff] [blame] | 37 | COPY ${CODE_SOURCE}/nginx.conf /etc/nginx/conf.d/default.conf |
| 38 | |
Matteo Scandolo | 02784ea | 2017-10-31 10:07:40 +0100 | [diff] [blame] | 39 | COPY --from=xos-gui-base ${VHOST} . |
| 40 | |
Zack Williams | ca68f35 | 2017-04-27 20:17:18 -0700 | [diff] [blame] | 41 | EXPOSE 4000 |
| 42 | |
Zack Williams | cb3a7b4 | 2017-04-15 17:07:18 -0700 | [diff] [blame] | 43 | ARG org_label_schema_schema_version=1.0 |
| 44 | ARG org_label_schema_name=xos-gui |
| 45 | ARG org_label_schema_version=unknown |
| 46 | ARG org_label_schema_vcs_url=unknown |
| 47 | ARG org_label_schema_vcs_ref=unknown |
| 48 | ARG org_label_schema_build_date=unknown |
| 49 | ARG org_opencord_vcs_commit_date=unknown |
| 50 | |
| 51 | LABEL org.label-schema.schema-version=$org_label_schema_schema_version \ |
| 52 | org.label-schema.name=$org_label_schema_name \ |
| 53 | org.label-schema.version=$org_label_schema_version \ |
| 54 | org.label-schema.vcs-url=$org_label_schema_vcs_url \ |
| 55 | org.label-schema.vcs-ref=$org_label_schema_vcs_ref \ |
| 56 | org.label-schema.build-date=$org_label_schema_build_date \ |
| 57 | org.opencord.vcs-commit-date=$org_opencord_vcs_commit_date |
| 58 | |