From 3d8e71271936b2f046312ccfcf64e30ebf62fd8a Mon Sep 17 00:00:00 2001 From: Sascha Hagedorn Date: Tue, 13 Aug 2019 22:02:18 +0200 Subject: [PATCH] Build Docker image from sources --- Dockerfile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index b01139b..1a6986a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,10 @@ -FROM alpine as build -RUN apk add --no-cache curl unzip -RUN curl -L `curl -s https://api.github.com/repos/nrenner/brouter-web/releases/latest | grep browser_download_url | cut -d '"' -f 4` -o brouter-web.zip +FROM node:8-alpine as build +RUN apk add --no-cache git RUN mkdir /tmp/brouter-web -RUN unzip -d /tmp/brouter-web brouter-web.zip +WORKDIR /tmp/brouter-web +COPY . . +RUN yarn install +RUN yarn run build FROM nginx:alpine COPY --from=build /tmp/brouter-web/index.html /usr/share/nginx/html