FROM node:24-alpine WORKDIR /app # Install dependencies first so this layer caches independently of source changes. COPY frontend/package.json frontend/package-lock.json ./ RUN npm install # Copy the rest of the frontend. The dev compose overlays individual paths # (./frontend/src, ./frontend/public, ./frontend/index.html) with host bind # mounts for live reload; if those bind mounts are absent (DinD, CI, k8s) # the image is still self-contained and `npm run dev` will serve from the # COPY'd files. COPY frontend/ . EXPOSE 3000 CMD ["npm", "run", "dev", "--", "--host", "0.0.0.0"]