diff --git a/Dockerfile b/Dockerfile index 82c9788..96c20fa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -51,7 +51,7 @@ COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./ # 从构建器中复制 scripts 目录 COPY --from=builder --chown=nextjs:nodejs /app/scripts ./scripts # 从构建器中复制 start.js -COPY --from=builder --chown=nextjs:nodejs /app/start.js ./start.js +COPY --from=builder --chown=nextjs:nodejs /app/start.cjs ./start.cjs # 从构建器中复制 public 和 .next/static 目录 COPY --from=builder --chown=nextjs:nodejs /app/public ./public COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static @@ -63,4 +63,4 @@ USER nextjs EXPOSE 3000 # 使用自定义启动脚本,先预加载配置再启动服务器 -CMD ["node", "start.js"] \ No newline at end of file +CMD ["node", "start.cjs"] \ No newline at end of file diff --git a/start.js b/start.cjs similarity index 100% rename from start.js rename to start.cjs