Skip to content

Commit 6789398

Browse files
Use node user instead of root
1 parent 77c071a commit 6789398

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Dockerfile

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ RUN apk --update add git openssh && \
44
rm -rf /var/lib/apt/lists/* && \
55
rm /var/cache/apk/*
66

7-
ENV APP_DIR /src/app/
7+
WORKDIR /src/app/
88

9-
RUN mkdir -p $APP_DIR
10-
11-
ADD ./package.json ${APP_DIR}
12-
13-
WORKDIR $APP_DIR
9+
ADD ./package.json .
1410

1511
RUN ["npm", "install"]
1612

1713
COPY . .
14+
15+
RUN chown -R node:node /src/app
16+
17+
USER node

0 commit comments

Comments
 (0)