update: Update Dockerfile

mack-mac
mackt 8 months ago
parent c3dd02a261
commit e3673f23fa

@ -4,14 +4,14 @@ FROM node:alpine AS deps
RUN apk add --no-cache libc6-compat
WORKDIR /app
COPY package.json package-lock.json ./
RUN yarn install --frozen-lockfile --registry=https://registry.npm.taobao.org
RUN npm install --frozen-lockfile --registry=https://registry.npm.taobao.org
# Rebuild the source code only when needed
FROM node:alpine AS builder
WORKDIR /app
COPY . .
COPY --from=deps /app/node_modules ./node_modules
RUN yarn build && yarn install --production --ignore-scripts --prefer-offline --registry=https://registry.npm.taobao.org
RUN npm run build && npm install --production --ignore-scripts --prefer-offline --registry=https://registry.npm.taobao.org
# Production image, copy all the files and run next
FROM node:alpine AS runner

@ -1,7 +1,7 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
// output: 'export',
distDir: 'dist',
// distDir: 'dist',
async rewrites() {
return [
{

Loading…
Cancel
Save