]> git.immae.eu Git - github/bastienwirtz/homer.git/commitdiff
copy artifacts later in the build step with permissions
authorCalvin Bui <3604363+calvinbui@users.noreply.github.com>
Thu, 11 Jun 2020 01:32:24 +0000 (11:32 +1000)
committerCalvin Bui <3604363+calvinbui@users.noreply.github.com>
Thu, 11 Jun 2020 01:32:24 +0000 (11:32 +1000)
Dockerfile
Dockerfile.arm32v7
Dockerfile.arm64v8

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
index 0b83a06f301571ba52c79ed32c498ce219092e5f..d1ef1389e69dc55135269d569141b6a9f1482ccc 100644 (file)
@@ -20,7 +20,6 @@ RUN wget https://github.com/multiarch/qemu-user-static/releases/download/${QEMU_
 FROM arm32v7/alpine:3.11
 
 COPY --from=qemu qemu-arm-static /usr/bin/
-COPY --from=build-stage /app/dist /www/
 
 ENV USER darkhttpd
 ENV GROUP darkhttpd
@@ -33,4 +32,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"]
index c007d0495ac93fe818fc7c34ecb2267f3f8f9692..2f26d09e8d1ef2099f8e7ee3785c054731498d4d 100644 (file)
@@ -20,7 +20,6 @@ RUN wget https://github.com/multiarch/qemu-user-static/releases/download/${QEMU_
 FROM arm64v8/alpine:3.11
 
 COPY --from=qemu qemu-aarch64-static /usr/bin/
-COPY --from=build-stage /app/dist /www/
 
 ENV USER darkhttpd
 ENV GROUP darkhttpd
@@ -33,4 +32,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"]