ARG NODE_VERSION=24.15.0 FROM node:${NODE_VERSION}-alpine WORKDIR /usr/src/app # Use cache mounts for faster installs RUN --mount=type=bind,source=backend/package.json,target=package.json \ --mount=type=bind,source=backend/package-lock.json,target=package-lock.json \ --mount=type=cache,target=/root/.npm \ npm ci # Copy the backend source COPY ./backend . # Copy and setup entrypoint COPY ./docker/entrypoint.sh /usr/local/bin/entrypoint.sh RUN chmod +x /usr/local/bin/entrypoint.sh EXPOSE 5000 ENTRYPOINT [ "entrypoint.sh" ] # This '$@' will be replaced by the CMD CMD ["npm", "start"]