]> git.immae.eu Git - github/bastienwirtz/homer.git/blobdiff - Dockerfile
remove duplicated part
[github/bastienwirtz/homer.git] / Dockerfile
index fd1120f6a1229eaaab8d58a70b1933066f757ee5..205d759fe2c02e463e07455ff86d09bfa85d800d 100644 (file)
@@ -4,7 +4,7 @@ FROM node:lts-alpine as build-stage
 WORKDIR /app
 
 COPY package*.json ./
-RUN yarn install
+RUN yarn install --frozen-lockfile
 
 COPY . .
 RUN yarn build
@@ -12,8 +12,6 @@ RUN yarn build
 # production stage
 FROM alpine:3.11
 
-COPY --from=build-stage /app/dist /www/
-
 ENV USER darkhttpd
 ENV GROUP darkhttpd
 ENV GID 911
@@ -24,4 +22,6 @@ RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} &
 
 USER ${USER}
 
+COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/
+
 ENTRYPOINT ["darkhttpd","/www/", "--no-listing"]
\ No newline at end of file