From 045b0b9889772e8b5687a44ceb4795a481fc60c9 Mon Sep 17 00:00:00 2001 From: kaiyou Date: Tue, 4 Dec 2018 16:00:16 +0100 Subject: [PATCH] Add a two-stages Dockerfile for building Riot --- Dockerfile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000..a76d7362eb --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +# Builder +FROM node:alpine as builder + +COPY . /src + +WORKDIR /src + +RUN apk add --no-cache git \ + && npm install \ + && npm run build + + +# App +FROM nginx:latest + +COPY --from=builder /src/webapp /app +COPY config.sample.json /app/config.json + +RUN rm -rf /usr/share/nginx/html \ + && ln -s /app /usr/share/nginx/html