Update Dockerfile

This commit is contained in:
Benjadevhw 2025-08-04 19:36:14 -06:00 committed by GitHub
parent 9cdb897a0f
commit d7c8b93c7a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,11 +1,19 @@
FROM node:20-alpine AS builder FROM node:20-alpine AS builder
# --- Fix peerdependency conflict -------------------------------------------------
# Setting this env var is equivalent to running every npm command with
# "--legacy-peer-deps", which prevents the ERESOLVE error produced when
# Baileys (peerrequires 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 && \ RUN apk update && \
apk add --no-cache git ffmpeg wget curl bash openssl 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 version="2.3.1" description="Api to control whatsapp features through http requests." \
LABEL maintainer="Davidson Gomes" git="https://github.com/DavidsonGomes" maintainer="Davidson Gomes" git="https://github.com/DavidsonGomes" \
LABEL contact="contato@evolution-api.com" contact="contato@evolution-api.com"
WORKDIR /evolution WORKDIR /evolution
@ -13,6 +21,7 @@ COPY ./package*.json ./
COPY ./tsconfig.json ./ COPY ./tsconfig.json ./
COPY ./tsup.config.ts ./ COPY ./tsup.config.ts ./
# With the ENV set above, npm ci will now ignore peerdependency conflicts.
RUN npm ci --silent RUN npm ci --silent
COPY ./src ./src COPY ./src ./src