mirror of
https://github.com/xitanggg/open-resume
synced 2024-11-03 09:19:21 +01:00
fix: update Dockerfile to install 'sharp' for image optimization in production mode- Added 'sharp' installation to the Dockerfile to ensure compatibility with Next.js image optimization in standalone mode.- Updated the build process to include 'sharp' as a dependency for the production environment.
This commit is contained in:
parent
d1e3c76341
commit
7322d0e02d
@ -1,5 +1,6 @@
|
||||
FROM node:18-alpine AS builder
|
||||
WORKDIR /app
|
||||
COPY package*.json ./
|
||||
COPY . .
|
||||
RUN npm install --include=dev
|
||||
RUN npm run build
|
||||
@ -9,6 +10,7 @@ WORKDIR /app
|
||||
COPY --from=builder /app/.next/standalone .
|
||||
COPY --from=builder /app/public ./public
|
||||
COPY --from=builder /app/.next/static ./.next/static
|
||||
RUN npm install sharp
|
||||
|
||||
EXPOSE 3000
|
||||
CMD ["node", "server.js"]
|
Loading…
Reference in New Issue
Block a user