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