From e1ddbd9777ee9d90b914e5fc9c656d7f2adea354 Mon Sep 17 00:00:00 2001 From: dannyrb Date: Sat, 4 May 2019 21:51:26 -0400 Subject: [PATCH] Rename the simpler dockerfile in root to dockerfile-web --- dockerfile-web | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 dockerfile-web diff --git a/dockerfile-web b/dockerfile-web new file mode 100644 index 000000000..23c027cfe --- /dev/null +++ b/dockerfile-web @@ -0,0 +1,25 @@ +# Stage 1: Build the application +# docker build -t ohif/viewer:latest . +FROM node:11.2.0-slim as builder + +# RUN apt-get update && apt-get install -y git yarn +RUN mkdir /usr/src/app +WORKDIR /usr/src/app + +ENV PATH /usr/src/app/node_modules/.bin:$PATH + +COPY package.json /usr/src/app/package.json +COPY yarn.lock /usr/src/app/yarn.lock + +ADD . /usr/src/app/ +RUN yarn install +RUN yarn run build:web + +# # Stage 2: Bundle the built application into a Docker container +# # which runs Nginx using Alpine Linux +FROM nginx:1.15.5-alpine +RUN rm -rf /etc/nginx/conf.d +COPY conf /etc/nginx +COPY --from=builder /usr/src/app/build /usr/share/nginx/html +EXPOSE 80 +CMD ["nginx", "-g", "daemon off;"]