-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: install required sharp dependency for production
- Loading branch information
1 parent
1f05e41
commit d23c1d4
Showing
3 changed files
with
837 additions
and
331 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# 1. Install dependencies only when needed | ||
FROM node:16-alpine AS deps | ||
FROM node:18-alpine AS deps | ||
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed. | ||
RUN apk add --no-cache libc6-compat | ||
|
||
|
@@ -20,7 +20,7 @@ COPY . . | |
RUN yarn build | ||
|
||
# 3. Production image, copy all the files and run next | ||
FROM node:16-alpine AS runner | ||
FROM node:18-alpine AS runner | ||
WORKDIR /app | ||
|
||
ENV NODE_ENV=production | ||
|
@@ -35,6 +35,7 @@ COPY --from=builder /app/public ./public | |
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./ | ||
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static | ||
|
||
RUN npm i [email protected] --ignore-engines | ||
USER nextjs | ||
|
||
EXPOSE 3000 | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.