copy artifacts later in the build step with permissions

This commit is contained in:
Calvin Bui
2020-06-11 11:32:24 +10:00
parent ac1442c640
commit d10b219db5
3 changed files with 6 additions and 4 deletions

View 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"]