File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,15 +5,15 @@ ENV NODE_ENV=production
55
66# Add and set non-root user. Disable the password and do not create a home folder.
77
8- RUN adduser -D ackee ackee
8+ RUN [ " adduser" , "-D" , " ackee" , " ackee" ]
99USER ackee
1010
1111WORKDIR /srv/app/
1212
1313# Add dependencies first so that Docker can use the cache as long as the dependencies stay unchanged
1414
1515COPY package.json package-lock.json /srv/app/
16- RUN npm ci
16+ RUN [ " npm" , "ci" ]
1717
1818# Copy source after the dependency step as it's more likely that the source changes
1919
@@ -33,7 +33,8 @@ COPY --from=build /srv/app/ /srv/app/
3333
3434# Create user/group to run as, change ownership of files and set user
3535
36- RUN adduser -D ackee ackee && chown -R ackee:ackee /srv/app
36+ RUN [ "adduser" , "-D" , "ackee" , "ackee" ]
37+ RUN [ "chown" , "-R" , "ackee:ackee" , "/srv/app" ]
3738USER ackee
3839
3940# Run healthcheck against MongoDB, server and API.
You can’t perform that action at this time.
0 commit comments