Unverified Commit efb2b8b0 authored by Victor Garcia's avatar Victor Garcia Committed by GitHub

docs(deployment): prune non-production deps (#23056)

added the following line, to remove the size of the `runner` (production) image. This will remove the `devDependencies` from the container after `next build` completes.

```
yarn install --production --ignore-scripts --prefer-offline
```

For the typescript starter, this is the change in size

| before <br/>proposed change<br/>size in bytes | after <br/> proposed change <br/> size in bytes|
|----|---|
|  347MB    | 176MB |
parent 84e47b82
......@@ -105,7 +105,7 @@ FROM node:alpine AS builder
WORKDIR /app
COPY . .
COPY --from=deps /app/node_modules ./node_modules
RUN yarn build
RUN yarn build && yarn install --production --ignore-scripts --prefer-offline
# Production image, copy all the files and run next
FROM node:alpine AS runner
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment