Skip to content

Commit 0c3d9de

Browse files
authored
Merge two commands in example dockerfile
1 parent 999efab commit 0c3d9de

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

docs/BestPractices.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,7 @@ RUN npm run build
225225

226226
# Make sure the alpine version is the same as in the build stage
227227
FROM alpine:3.16
228-
RUN apk add --no-cache libstdc++
229-
RUN apk add --no-cache dumb-init
228+
RUN apk add --no-cache libstdc++ dumb-init
230229
RUN addgroup -g 1000 node && adduser -u 1000 -G node -s /bin/sh -D node
231230

232231
COPY --from=builder /usr/local/bin/node /usr/local/bin/
@@ -239,7 +238,7 @@ COPY --from=builder /build-stage/dist ./dist
239238

240239
RUN chown -R node:node ./
241240
USER node
242-
# Run with dumb-init to not start node with PID=1, since Node.js was not designed to run as PID 1
241+
# Run with dumb-init to not start node with PID=1, since Node.js was not designed to run as PID 1
243242
CMD ["dumb-init", "node", "dist/index.js"]
244243
```
245244

0 commit comments

Comments
 (0)