Skip to content

Commit

Permalink
copy artifacts later in the build step with permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
calvinbui committed Jun 11, 2020
1 parent ac1442c commit d10b219
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"]
3 changes: 2 additions & 1 deletion Dockerfile.arm32v7
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"]
3 changes: 2 additions & 1 deletion Dockerfile.arm64v8
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"]

0 comments on commit d10b219

Please sign in to comment.