ci: docker_tag=ext - Migrate to Debian base with minimal packages
All checks were successful
build-and-push-ext / build_push (push) Successful in 1m47s

This commit is contained in:
dev4 2025-09-21 18:24:52 +00:00
parent a573c475f7
commit 65b2da6d04

View File

@ -26,18 +26,23 @@ RUN npm run build
# Réduction aux deps de production
RUN npm prune --omit=dev && npm cache clean --force
FROM node:19-alpine
FROM debian:bookworm-slim
WORKDIR /app
# Installation des dépendances minimales nécessaires
RUN apk update && apk upgrade && apk add --no-cache \
curl \
jq \
&& rm -rf /var/cache/apk/* /tmp/* /var/tmp/*
RUN apt-get update && apt-get upgrade -y && \
apt-get install -y --fix-missing \
ca-certificates curl jq git && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Installation de Node.js
RUN curl -fsSL https://deb.nodesource.com/setup_19.x | bash - && \
apt-get install -y nodejs && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Création d'un utilisateur non-root
RUN adduser -D appuser --uid 10000 && \
chown -R appuser /app
RUN useradd -m -u 1000 appuser && \
mkdir -p /app && chown -R appuser:appuser /app
# Retour à l'utilisateur appuser
USER appuser