Segunda Nueva actualizacion al dockerFile
This commit is contained in:
17
Dockerfile
17
Dockerfile
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user