Skip to content

Commit b2e0908

Browse files
authored
Merge pull request #2410 from MikeMcC399/update-smaller-images-example
docs: update smaller images (npm/yarn) example to current versions
2 parents 26eeb12 + ac1212e commit b2e0908

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

docs/BestPractices.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,9 @@ COPY --from=builder node_modules .
213213
If you want to achieve an even smaller image size than the `-alpine`, you can omit the npm/yarn like this:
214214

215215
```Dockerfile
216-
ARG ALPINE_VERSION=3.16
216+
ARG ALPINE_VERSION=3.23
217217

218-
FROM node:18-alpine${ALPINE_VERSION} AS builder
218+
FROM node:24-alpine${ALPINE_VERSION} AS builder
219219
WORKDIR /build-stage
220220
COPY package*.json ./
221221
RUN npm ci
@@ -240,5 +240,3 @@ COPY --from=builder /build-stage/dist ./dist
240240
# Run with dumb-init to not start node with PID=1, since Node.js was not designed to run as PID 1
241241
CMD ["dumb-init", "node", "dist/index.js"]
242242
```
243-
244-

0 commit comments

Comments
 (0)