Skip to content

Commit

Permalink
chore: install required sharp dependency for production
Browse files Browse the repository at this point in the history
  • Loading branch information
jycssu-com committed Oct 24, 2024
1 parent 1f05e41 commit d23c1d4
Show file tree
Hide file tree
Showing 3 changed files with 837 additions and 331 deletions.
5 changes: 3 additions & 2 deletions Dockerfile
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

Expand All @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d23c1d4

Please sign in to comment.