fixed bun AVX
This commit is contained in:
25
Dockerfile
25
Dockerfile
@@ -1,22 +1,25 @@
|
||||
# Use official Bun image
|
||||
# ***NEVER FORGET THE PRINCIPLES RULES***
|
||||
FROM oven/bun:1.3-alpine AS base
|
||||
|
||||
# Set working directory
|
||||
# Build stage - Use Node.js to avoid AVX CPU requirement
|
||||
FROM node:20-alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy package files
|
||||
COPY package.json bun.lock* ./
|
||||
|
||||
# Install dependencies
|
||||
FROM base AS deps
|
||||
RUN bun install --frozen-lockfile --production
|
||||
# Install dependencies using npm (works without AVX)
|
||||
RUN npm install
|
||||
|
||||
# Build stage
|
||||
FROM base AS builder
|
||||
RUN bun install --frozen-lockfile
|
||||
COPY . .
|
||||
RUN bun run build
|
||||
|
||||
# Client: Vite build via Node.js
|
||||
# API: Skip bun build, copy src files directly (Bun will run them at runtime)
|
||||
RUN npm run build:client
|
||||
|
||||
FROM node:20-alpine AS deps
|
||||
WORKDIR /app
|
||||
COPY package.json bun.lock* ./
|
||||
RUN npm install --production
|
||||
|
||||
# Production stage
|
||||
FROM oven/bun:1.3-alpine AS runner
|
||||
|
||||
Reference in New Issue
Block a user