79651721

Date: 2025-06-03 18:16:55
Score: 0.5
Natty:
Report link

The issue was how I was copying my file structure in this part:

# Copy source code and build
COPY --from=dependencies /app/node_modules ./node_modules
COPY package.json eslint.config.mjs tsconfig.json ./
COPY . ./frontend
RUN npm run build frontend

I was changing the application structure to try and help with caching, but this wasn't actually necessary and was just causing too many problems. Updating it to this:

# Copy source code and build
COPY --from=dependencies /app/node_modules ./node_modules
COPY . .
RUN npm run build

and changing the rest of the Dockerfile accordingly resolved the issue.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Sam Hill