From d7c8b93c7a6959b413ef3e2de43be12b7c34c551 Mon Sep 17 00:00:00 2001 From: Benjadevhw Date: Mon, 4 Aug 2025 19:36:14 -0600 Subject: [PATCH] Update Dockerfile --- Dockerfile | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 02130c43..0e55e9bd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,19 @@ FROM node:20-alpine AS builder +# --- Fix peer‑dependency conflict ------------------------------------------------- +# Setting this env var is equivalent to running every npm command with +# "--legacy-peer-deps", which prevents the ERESOLVE error produced when +# Baileys (peer‑requires jimp@^1.6.0) clashes with the jimp@0.16.x version +# locked in EvolutionAPI's package.json. +# ------------------------------------------------------------------------------- +ENV NPM_CONFIG_LEGACY_PEER_DEPS=true + RUN apk update && \ apk add --no-cache git ffmpeg wget curl bash openssl -LABEL version="2.3.1" description="Api to control whatsapp features through http requests." -LABEL maintainer="Davidson Gomes" git="https://github.com/DavidsonGomes" -LABEL contact="contato@evolution-api.com" +LABEL version="2.3.1" description="Api to control whatsapp features through http requests." \ + maintainer="Davidson Gomes" git="https://github.com/DavidsonGomes" \ + contact="contato@evolution-api.com" WORKDIR /evolution @@ -13,6 +21,7 @@ COPY ./package*.json ./ COPY ./tsconfig.json ./ COPY ./tsup.config.ts ./ +# With the ENV set above, npm ci will now ignore peer‑dependency conflicts. RUN npm ci --silent COPY ./src ./src