diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..b2a9091 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,11 @@ +# Exclude a bunch of stuff which can make the build context a larger than it needs to be +.git/ +tests/ +build/ +lib/ +node_modules/ +electron_app/ +karma-reports/ +.idea/ +.tmp/ +config.json* diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ba08b73 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +# Builder +FROM node:10-alpine as builder + +WORKDIR /src + +COPY . /src +RUN yarn --network-timeout=100000 install +RUN yarn build + + +# App +FROM nginx:alpine + +COPY --from=builder /src/build /app + +RUN rm -rf /usr/share/nginx/html \ + && ln -s /app /usr/share/nginx/html