FROM oven/bun:1 AS build-stage WORKDIR /app # Install sharp dependencies for Linux RUN apt-get update && apt-get install -y \ python3 \ make \ g++ \ && rm -rf /var/lib/apt/lists/* COPY package.json bun.lockb* ./ RUN bun install --frozen-lockfile COPY . . RUN bun run build FROM oven/bun:1 AS production-stage WORKDIR /app # Install sharp dependencies in production stage as well RUN apt-get update && apt-get install -y \ python3 \ make \ g++ \ && rm -rf /var/lib/apt/lists/* COPY --from=build-stage /app /app EXPOSE 3000 ENV NODE_ENV=production CMD ["bun", "run", "start"]