]> git.immae.eu Git - github/bastienwirtz/homer.git/blobdiff - Dockerfile
copy artifacts later in the build step with permissions
[github/bastienwirtz/homer.git] / Dockerfile
index fd1120f6a1229eaaab8d58a70b1933066f757ee5..29fda0ed766649d85897a9867b77b7f7e8bc01df 100644 (file)
@@ -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