Skip to content

Commit 85127fd

Browse files
authored
Merge pull request #667 from pjonsson/no-root-dirs
Dockerfile: keep /app owned by node:node
2 parents c12dddf + 3808201 commit 85127fd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ USER node
1919

2020
WORKDIR /app
2121

22-
COPY --from=build /app/wwwroot wwwroot
23-
COPY --from=build /app/node_modules node_modules
22+
# Without the chown when copying directories, wwwroot is owned by root:root.
23+
COPY --from=build --chown=node:node /app/wwwroot wwwroot
24+
COPY --from=build --chown=node:node /app/node_modules node_modules
2425
COPY --from=build /app/devserverconfig.json serverconfig.json
2526
COPY --from=build /app/index.js index.js
2627
COPY --from=build /app/package.json package.json

0 commit comments

Comments
 (0)