Segunda Nueva actualizacion al dockerFile

This commit is contained in:
2026-08-21 01:53:57 +00:00
parent 86e81c1cf2
commit e72fc3e307

View File

@@ -3,7 +3,7 @@ ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PNPM_HOME/bin:$PATH" ENV PATH="$PNPM_HOME:$PNPM_HOME/bin:$PATH"
RUN corepack enable RUN corepack enable
# Herramientas necesarias para compilar dependencias nativas (sharp/libvips) # Instalación de herramientas de desarrollo necesarias
RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \
python3 \ python3 \
build-essential \ build-essential \
@@ -19,15 +19,20 @@ WORKDIR /app
COPY . . COPY . .
# Desactivar scripts de git (como husky) y forzar la compilación local de sharp
ENV HUSKY=0 ENV HUSKY=0
ENV npm_config_build_from_source=true ENV CI=false
ENV SHARP_IGNORE_GLOBAL_LIBVIPS=0
# Instalación recursiva en todos los workspaces del monorepo # 1. Instructivos para deshabilitar precompilados v2
ENV SHARP_IGNORE_GLOBAL_LIBVIPS=0
ENV npm_config_build_from_source=true
# 2. Instalación de dependencias
RUN pnpm install -r --config.frozen-lockfile=false RUN pnpm install -r --config.frozen-lockfile=false
# Compilación con Turbo # 3. Forzar la reconstrucción explícita de sharp con node-gyp para el CPU actual
RUN pnpm rebuild sharp
# 4. Compilación con Turbo
RUN pnpm dlx turbo build --filter=api RUN pnpm dlx turbo build --filter=api
FROM base AS runner FROM base AS runner