blob: a01467f3af3a441ebe03e1599d626f9720e4803c [file] [log] [blame]
Zack Williamscb3a7b42017-04-15 17:07:18 -07001# xosproject/xos-gui
Matteo Scandolo57aee472018-06-28 15:24:42 -07002# docker build -f Dockerfile -t xosproject/xos-gui:candidate .
Matteo Scandolod819c922016-12-02 14:06:14 -08003
Matteo Scandolod0e21df2017-11-16 10:17:12 -08004# xos-gui-base container
Andy Bavier8a6be4c2018-06-28 13:11:17 -07005FROM xosproject/xos-gui-builder:1.0.0 as xos-gui-base
Matteo Scandolod0e21df2017-11-16 10:17:12 -08006
Zack Williamsca68f352017-04-27 20:17:18 -07007ENV CODE_SOURCE .
8ENV CODE_DEST /var/www
9ENV VHOST /var/www/dist
10
Zack Williamsca68f352017-04-27 20:17:18 -070011COPY ${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}/
17COPY ${CODE_SOURCE}/conf/ ${CODE_DEST}/conf/
18COPY ${CODE_SOURCE}/gulp_tasks/ ${CODE_DEST}/gulp_tasks/
19COPY ${CODE_SOURCE}/src/ ${CODE_DEST}/src/
20
Zack Williamsca68f352017-04-27 20:17:18 -070021WORKDIR ${CODE_DEST}
22RUN npm install \
23 && npm run typings \
Matteo Scandolo02784ea2017-10-31 10:07:40 +010024 && npm run build
25
26
Matteo Scandolod0e21df2017-11-16 10:17:12 -080027# xos-gui container
Andy Bavier8a6be4c2018-06-28 13:11:17 -070028FROM nginx:1.13
Matteo Scandolo02784ea2017-10-31 10:07:40 +010029
30ENV CODE_SOURCE .
31ENV VHOST /var/www/dist
32
33WORKDIR ${VHOST}
34
Matteo Scandolo02784ea2017-10-31 10:07:40 +010035RUN mkdir -p /var/log/nginx/log
Zack Williamsca68f352017-04-27 20:17:18 -070036
Zack Williamsca68f352017-04-27 20:17:18 -070037COPY ${CODE_SOURCE}/nginx.conf /etc/nginx/conf.d/default.conf
38
Matteo Scandolo02784ea2017-10-31 10:07:40 +010039COPY --from=xos-gui-base ${VHOST} .
40
Zack Williamsca68f352017-04-27 20:17:18 -070041EXPOSE 4000
42
Zack Williamscb3a7b42017-04-15 17:07:18 -070043ARG org_label_schema_schema_version=1.0
44ARG org_label_schema_name=xos-gui
45ARG org_label_schema_version=unknown
46ARG org_label_schema_vcs_url=unknown
47ARG org_label_schema_vcs_ref=unknown
48ARG org_label_schema_build_date=unknown
49ARG org_opencord_vcs_commit_date=unknown
50
51LABEL 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