Nueva actualizacion al dockerFile
This commit is contained in:
10
Dockerfile
10
Dockerfile
@@ -3,24 +3,24 @@ ENV PNPM_HOME="/pnpm"
|
|||||||
ENV PATH="$PNPM_HOME:$PATH"
|
ENV PATH="$PNPM_HOME:$PATH"
|
||||||
RUN corepack enable
|
RUN corepack enable
|
||||||
|
|
||||||
# 1. Instalar herramientas esenciales del sistema para compilar sharp de forma nativa
|
# 1. Instalar herramientas del sistema para compilar sharp de forma nativa
|
||||||
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
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# 2. Forzar la compilación local de sharp para tu CPU antigua
|
# 2. Forzar compilación local de sharp para tu CPU
|
||||||
ENV SHARP_IGNORE_GLOBAL_LIBVIPS=1
|
ENV SHARP_IGNORE_GLOBAL_LIBVIPS=1
|
||||||
|
|
||||||
# 3. Configurar arquitecturas en PNPM para evitar binarios incompatibles
|
# 3. Configurar arquitecturas nativas en 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 la creación del lockfile permitiendo la acción en la raíz del monorrepo (-w)
|
# 4. Instalar TODO (incluye devDependencies para poder usar nest build) sin bloquear el lockfile
|
||||||
ENV CI=false
|
ENV CI=false
|
||||||
RUN pnpm install -w --config.frozen-lockfile=false --include=optional
|
RUN pnpm install -w --config.frozen-lockfile=false
|
||||||
|
|
||||||
# 5. Compilar la aplicación NestJS usando Turbo
|
# 5. Compilar la aplicación NestJS usando Turbo
|
||||||
RUN pnpm turbo build --filter=api
|
RUN pnpm turbo build --filter=api
|
||||||
|
|||||||
Reference in New Issue
Block a user