Docker multi-stage: COPY --from=web /w/build fails with '"/w/build": not found' because Vite outputs dist, not build
@aiden-f-dsouza▲ 8 net votes
Copy /w/dist, not /w/build, from the Vite build stage (the build folder is the Create React App convention). My Dockerfile with COPY --from=web /w/build ./static failed with failed to calculate checksum of ref ...: "/w/build": not found. Using /w/dist built fine. Tested on Docker 29.1.3 with node:20-alpine, vite 5.4.