blob: 9f39abf6fbc06518ac65500dd56b3d8b886e8808 [file] [log] [blame]
Zack Williamscb3a7b42017-04-15 17:07:18 -07001# xosproject/xos-gui
Matteo Scandolod0e21df2017-11-16 10:17:12 -08002# To build use: docker build -f Dockerfile -t xosproject/xos-gui:candidate . (note that this require xos-gui-extension-builder to be built)
Matteo Scandolo11b4a632017-02-09 10:28:41 -08003# To run use: docker run -p 4000:4000 --volumes-from gui-extensions-store -d xosproject/xos-gui
Matteo Scandolod819c922016-12-02 14:06:14 -08004
Matteo Scandolod0e21df2017-11-16 10:17:12 -08005# xos-gui-base container
6FROM xosproject/xos-gui-builder:candidate as xos-gui-base
7
Zack Williamsca68f352017-04-27 20:17:18 -07008ENV CODE_SOURCE .
9ENV CODE_DEST /var/www
10ENV VHOST /var/www/dist
11
Zack Williamsca68f352017-04-27 20:17:18 -070012COPY ${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}/
18COPY ${CODE_SOURCE}/conf/ ${CODE_DEST}/conf/
19COPY ${CODE_SOURCE}/gulp_tasks/ ${CODE_DEST}/gulp_tasks/
20COPY ${CODE_SOURCE}/src/ ${CODE_DEST}/src/
21
Zack Williamsca68f352017-04-27 20:17:18 -070022WORKDIR ${CODE_DEST}
23RUN npm install \
24 && npm run typings \
Matteo Scandolo02784ea2017-10-31 10:07:40 +010025 && npm run build
26
27
Matteo Scandolod0e21df2017-11-16 10:17:12 -080028# xos-gui container
Matteo Scandolo02784ea2017-10-31 10:07:40 +010029FROM nginx:candidate
30
31ENV CODE_SOURCE .
32ENV VHOST /var/www/dist
33
34WORKDIR ${VHOST}
35
Matteo Scandolo02784ea2017-10-31 10:07:40 +010036RUN mkdir -p /var/log/nginx/log
Zack Williamsca68f352017-04-27 20:17:18 -070037
Zack Williamsca68f352017-04-27 20:17:18 -070038COPY ${CODE_SOURCE}/nginx.conf /etc/nginx/conf.d/default.conf
39
Matteo Scandolo02784ea2017-10-31 10:07:40 +010040COPY --from=xos-gui-base ${VHOST} .
41
Zack Williamsca68f352017-04-27 20:17:18 -070042EXPOSE 4000
43
Zack Williamscb3a7b42017-04-15 17:07:18 -070044ARG org_label_schema_schema_version=1.0
45ARG org_label_schema_name=xos-gui
46ARG org_label_schema_version=unknown
47ARG org_label_schema_vcs_url=unknown
48ARG org_label_schema_vcs_ref=unknown
49ARG org_label_schema_build_date=unknown
50ARG org_opencord_vcs_commit_date=unknown
51
52LABEL 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