From 7d0272606affbbbd63e2f10f1ec0993dda05e4f7 Mon Sep 17 00:00:00 2001 From: Adam Roe Date: Wed, 14 Aug 2024 19:45:34 +1000 Subject: [PATCH] Update Dockerfile to better pull from git --- Dockerfile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8a880c9..47e280b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,14 @@ +FROM alpine/git:latest +WORKDIR /clone-workspace +RUN git clone https://git.spd.ltd/xadammr/pi-weather-station.git + FROM node:18-alpine -RUN apk add git RUN mkdir /home/node/app RUN mkdir -p /home/node/app/node_modules && chown -R node:node /home/node/app -WORKDIR /home/node/app -RUN rm -rf * +COPY --from=0 /clone-workspace/pi-weather-station /home/node/app/pi-weather-station -RUN git clone https://git.spd.ltd/xadammr/pi-weather-station.git +WORKDIR /home/node/app RUN chown -R node:node . WORKDIR /home/node/app/pi-weather-station