2019-11-22 23:17:15 +00:00
|
|
|
# builder
|
2019-12-09 13:24:39 +00:00
|
|
|
FROM node:12.13.1-stretch as builder
|
2019-11-22 23:40:03 +00:00
|
|
|
COPY . /mesh
|
|
|
|
WORKDIR /mesh
|
2019-11-22 23:17:15 +00:00
|
|
|
|
|
|
|
# show versions
|
|
|
|
RUN node --version && npm --version && yarn --version
|
|
|
|
|
|
|
|
# install gulp
|
2019-11-22 23:42:27 +00:00
|
|
|
RUN npm i gulp-cli -g
|
|
|
|
RUN npm i gulp -g
|
2019-11-22 23:17:15 +00:00
|
|
|
|
|
|
|
# run yarn for prerequisits
|
|
|
|
RUN yarn
|
|
|
|
|
|
|
|
# run gulp to build app
|
2019-11-22 23:30:41 +00:00
|
|
|
RUN gulp
|
2019-11-22 23:17:15 +00:00
|
|
|
|
|
|
|
# build docker container
|
|
|
|
FROM nginx:1.17.6-alpine as meshviewer
|
2019-11-22 23:40:03 +00:00
|
|
|
COPY --from=builder /mesh/build /usr/share/nginx/html/
|