Skip to content

Fix Dockerfile frontend build path#296

Merged
239573049 merged 2 commits intomainfrom
copilot/fix-dockerfile-build-issue
Nov 13, 2025
Merged

Fix Dockerfile frontend build path#296
239573049 merged 2 commits intomainfrom
copilot/fix-dockerfile-build-issue

Conversation

Copy link
Contributor

Copilot AI commented Nov 13, 2025

Docker build fails at final stage with "/app/static": not found when copying frontend assets.

Changes

  • Dockerfile: Corrected COPY path from /app/static to /app/dist to match Vite's default output directory
# Before
COPY --from=frontend-build /app/static ./wwwroot

# After  
COPY --from=frontend-build /app/dist ./wwwroot

The frontend build stage uses Vite which outputs to dist/ by default. The assetsDir: 'static' config in vite.config.ts creates a subdirectory within dist, not at the root.

Original prompt

This section details on the original issue you should resolve

<issue_title>Dockerfile构建问题</issue_title>
<issue_description>#33 [frontend-build 6/6] RUN npm run build
#33 45.54
#33 45.54 ✨ [vite-plugin-compression]:algorithm=gzip - compressed file successfully:
#33 45.54 dist//app/static/MermaidEnhanced-DpDHFeOs.js.gz 11.55kb / gzip: 3.90kb
#33 45.54 dist//app/static/baseUniq-rYtFMRdv.js.gz 11.61kb / gzip: 4.53kb
#33 45.54 dist//app/static/Combination-DLHE2YM7.js.gz 16.41kb / gzip: 6.21kb
#33 45.54 dist//app/static/clojure-BMjYHr_A.js.gz 10.56kb / gzip: 3.90kb
#33 45.54 dist//app/static/css-BnMrqG3P.js.gz 26.50kb / gzip: 8.27kb
#33 45.55 dist//app/static/clike-B9uivgTg.js.gz 21.78kb / gzip: 7.68kb
#33 45.55 dist//app/static/diagram-PSM6KHXK-CBT62d4r.js.gz 15.50kb / gzip: 5.54kb
#33 45.55 dist//app/static/chunk-DI55MBZ5-D5xqT_Tp.js.gz 35.49kb / gzip: 11.56kb
#33 45.55 dist//app/static/dropdown-menu-D68s5LOb.js.gz 20.00kb / gzip: 6.19kb
#33 45.55 dist//app/static/dagre-6UL2VRFP-DSLCKYsj.js.gz 10.75kb / gzip: 4.01kb
#33 45.55 dist//app/static/erDiagram-Q2GNP2WA-DuHfGm1F.js.gz 24.65kb / gzip: 8.63kb
#33 45.55 dist//app/static/gitGraphDiagram-NY62KEGX-s93EWF-
.js.gz 23.57kb / gzip: 7.24kb
#33 45.55 dist//app/static/chunk-B4BG7PRW-C2EZ6zf-.js.gz 44.26kb / gzip: 14.35kb
#33 45.55 dist//app/static/idl-BEugSyMb.js.gz 11.36kb / gzip: 4.41kb
#33 45.55 dist//app/static/index-4fSU05y8.js.gz 22.62kb / gzip: 6.54kb
#33 45.55 dist//app/static/index-3XVWG3Af.js.gz 15.27kb / gzip: 4.46kb
#33 45.55 dist//app/static/index-4wFDYboO.js.gz 11.13kb / gzip: 3.80kb
#33 45.55 dist//app/static/index-BNyBkVq9.js.gz 18.91kb / gzip: 4.72kb
#33 45.55 dist//app/static/index-BmtSSVVi.js.gz 12.65kb / gzip: 3.06kb
#33 45.55 dist//app/static/index-CayTUqzu.js.gz 22.88kb / gzip: 10.33kb
#33 45.55 dist//app/static/index-BUyzKELR.js.gz 25.53kb / gzip: 7.09kb
#33 45.55 dist//app/static/index-CAx0s5jR.js.gz 12.75kb / gzip: 4.58kb
#33 45.55 dist//app/static/index-Cc9hJDNy.js.gz 47.16kb / gzip: 13.97kb
#33 45.55 dist//app/static/index-Clb8OvHR.js.gz 31.18kb / gzip: 7.58kb
#33 45.55 dist//app/static/index-D1ZXEyBx.js.gz 31.96kb / gzip: 12.96kb
#33 45.55 dist//app/static/index-DD9ZmLNx.js.gz 30.49kb / gzip: 12.56kb
#33 45.55 dist//app/static/index-CoFD5ylr.css.gz 10.39kb / gzip: 2.95kb
#33 45.55 dist//app/static/index-CjzEWd8Q.js.gz 26.29kb / gzip: 10.15kb
#33 45.55 dist//app/static/index-DTSVChaH.js.gz 33.49kb / gzip: 7.60kb
#33 45.55 dist//app/static/index-DD_noaJ2.js.gz 20.76kb / gzip: 9.31kb
#33 45.55 dist//app/static/index-DkkfQSLa.js.gz 16.29kb / gzip: 7.46kb
#33 45.55 dist//app/static/index-DntefM98.js.gz 17.30kb / gzip: 5.69kb
#33 45.55 dist//app/static/index-DvUsiOSv.css.gz 29.54kb / gzip: 8.12kb
#33 45.55 dist//app/static/index-cgjJWjrB.js.gz 10.76kb / gzip: 2.64kb
#33 45.55 dist//app/static/index-qYUZmaC-.js.gz 14.74kb / gzip: 6.02kb
#33 45.55 dist//app/static/index-IjQPcSgz.js.gz 19.70kb / gzip: 9.25kb
#33 45.55 dist//app/static/index-rhPuFMHY.js.gz 12.82kb / gzip: 5.68kb
#33 45.55 dist//app/static/javascript-iXu5QeM3.js.gz 16.68kb / gzip: 5.62kb
#33 45.55 dist//app/static/kanban-definition-3W4ZIXB7-BhI-wSE_.js.gz 19.73kb / gzip: 6.99kb
#33 45.55 dist//app/static/mindmap-definition-VGOIOE7T-w7ws2GCx.js.gz ...


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: 239573049 <61819790+239573049@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix Dockerfile build issues in frontend Fix Dockerfile frontend build path Nov 13, 2025
Copilot AI requested a review from 239573049 November 13, 2025 10:00
@239573049 239573049 marked this pull request as ready for review November 13, 2025 10:36
Copilot AI review requested due to automatic review settings November 13, 2025 10:36
@239573049 239573049 merged commit 30d0e3d into main Nov 13, 2025
2 checks passed
@239573049 239573049 deleted the copilot/fix-dockerfile-build-issue branch November 13, 2025 10:37
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a Docker build failure in the final stage caused by an incorrect COPY path for frontend assets. The build was attempting to copy from /app/static when Vite outputs to /app/dist by default.

Key Change:

  • Updated Dockerfile COPY command to use the correct Vite output directory (/app/dist instead of /app/static)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dockerfile构建问题

3 participants