1
0

Add Dockerfile

This commit is contained in:
2024-07-15 20:57:34 +10:00
parent 97cec5a5f9
commit 9d595291cb
+16
View File
@@ -0,0 +1,16 @@
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 *
RUN git clone https://git.spd.ltd/xadammr/pi-weather-station.git
RUN chown -R node:node .
WORKDIR /home/node/app/pi-weather-station
USER node
RUN npm install
EXPOSE 8080
CMD ["npm", "start"]