fix: copy next config into docker runtime image - #756
Open
cylgdzz111 wants to merge 1 commit into
Open
Conversation
✅ Deploy Preview for gleeful-palmier-13a6af ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更类型
变更描述
Docker 多阶段构建中,
builder阶段会使用next.config.js执行next build,但runner阶段没有复制该配置文件。运行阶段通过
pnpm start执行next start -p 1717时,Next.js 仍可能需要读取项目的next.config.js。因此本 PR 将next.config.js从 builder 阶段复制到 runtime image,保证 Docker 构建产物和运行环境配置一致。修改内容
Dockerfile的 runner 阶段添加:COPY --from=builder /app/next.config.js ./next.config.js