]> git.immae.eu Git - github/bastienwirtz/homer.git/blobdiff - Dockerfile
specify all icons path to fix pwa issue,
[github/bastienwirtz/homer.git] / Dockerfile
index df889349839d9ba4c0369706f33a50deeec7ed3f..ea28aa3ab2f303eb738c1f4531e895007233734c 100644 (file)
@@ -1,15 +1,27 @@
+# build stage
+FROM node:lts-alpine as build-stage
+
+WORKDIR /app
+
+COPY package*.json ./
+RUN yarn install
+
+COPY . .
+RUN yarn build
+
+# production stage
 FROM alpine:3.11
 
-COPY ./ /www/
+COPY --from=build-stage /app/dist /www/
 
-ENV USER abc
-ENV GROUP abc
+ENV USER darkhttpd
+ENV GROUP darkhttpd
 ENV GID 911
 ENV UID 911
 
 RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} && \
     apk add -U darkhttpd
 
-USER abc
+USER darkhttpd
 
-ENTRYPOINT ["darkhttpd","/www/"]
+ENTRYPOINT ["darkhttpd","/www/", "--no-listing"]
\ No newline at end of file