Nueva actualizacion al dockerFile
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
# 1. Instalar herramientas nativas indispensables del sistema para compilar sharp
|
# Herramientas esenciales para compilar sharp desde fuente en el host actual
|
||||||
RUN apt-get update && apt-get install -y python3 build-essential gcc g++ make libc-dev && rm -rf /var/lib/apt/lists/*
|
RUN apt-get update && apt-get install -y python3 build-essential gcc g++ make libc-dev && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
FROM base AS builder
|
FROM base AS builder
|
||||||
@@ -11,19 +11,14 @@ WORKDIR /app
|
|||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# 2. Forzar la compilación local de sharp saltándose restricciones de microarquitectura v2
|
|
||||||
ENV SHARP_IGNORE_GLOBAL_LIBVIPS=1
|
ENV SHARP_IGNORE_GLOBAL_LIBVIPS=1
|
||||||
|
|
||||||
# 3. Configurar parámetros de arquitectura en el motor de PNPM
|
|
||||||
RUN pnpm config set supportedArchitectures.os linux
|
RUN pnpm config set supportedArchitectures.os linux
|
||||||
RUN pnpm config set supportedArchitectures.cpu x64
|
RUN pnpm config set supportedArchitectures.cpu x64
|
||||||
RUN pnpm config set supportedArchitectures.libc glibc
|
RUN pnpm config set supportedArchitectures.libc glibc
|
||||||
|
|
||||||
# 4. Forzar instalación completa y regenerar enlaces binarios
|
|
||||||
ENV CI=false
|
ENV CI=false
|
||||||
RUN pnpm install -w --config.frozen-lockfile=false
|
RUN pnpm install -w --config.frozen-lockfile=false
|
||||||
|
|
||||||
# 5. Ejecutar la compilación nativa con turbo
|
|
||||||
RUN pnpm dlx turbo build --filter=api
|
RUN pnpm dlx turbo build --filter=api
|
||||||
|
|
||||||
FROM base AS runner
|
FROM base AS runner
|
||||||
|
|||||||
Reference in New Issue
Block a user