No .dockerignore existed, so `COPY . .` (Dockerfile:31) copied the host's
node_modules over the fresh `npm ci` tree — poisoning BuildKit's node_modules
cache-mount ('cannot replace directory with file') and breaking every world
image build (main + PR #19). The web stage installs its own deps, so the host
node_modules/dist/.git must never enter the build context.
31 lines
656 B
Plaintext
31 lines
656 B
Plaintext
# Build the image from source only — never copy host-built artifacts or deps.
|
|
#
|
|
# The web stage runs `npm ci` + `npm run build` itself and the go stage copies
|
|
# go.mod/cmd/internal explicitly (see Dockerfile), so the host must NOT ship its
|
|
# own node_modules/dist into the context: at `COPY . .` a host node_modules
|
|
# clobbers the image's fresh `npm ci` tree and poisons BuildKit's node_modules
|
|
# cache-mount ("cannot replace directory with file"), which breaks every build.
|
|
node_modules
|
|
**/node_modules
|
|
dist
|
|
**/dist
|
|
build
|
|
out
|
|
.next
|
|
|
|
.git
|
|
.gitignore
|
|
.github
|
|
|
|
*.log
|
|
npm-debug.log*
|
|
.env
|
|
.env.*
|
|
!.env.example
|
|
|
|
.DS_Store
|
|
.vscode
|
|
.idea
|
|
coverage
|
|
*.tsbuildinfo
|