From b720143cae4e494b80739880af76cc3818c2e92c Mon Sep 17 00:00:00 2001 From: paulo-roger <103009333+paulo-roger@users.noreply.github.com> Date: Mon, 18 Aug 2025 14:43:32 -0300 Subject: [PATCH] Update Dockerfile Dockerfile: add Python & psycopg2 support for external auth scripts This change installs python3, pip, and required build deps in both build and runtime stages, and globally installs bcrypt and psycopg2. Motivation: - ejabberd supports external authentication scripts written in Python. - These scripts often require bcrypt (password hashing) and psycopg2 (PostgreSQL driver). - Currently, users need to extend the official image to add these dependencies manually. With this change, the official Docker image can run Python auth scripts out of the box. --- .github/container/Dockerfile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/container/Dockerfile b/.github/container/Dockerfile index ec9a4881a..b29d4fa80 100644 --- a/.github/container/Dockerfile +++ b/.github/container/Dockerfile @@ -19,6 +19,11 @@ RUN go install -v \ FROM docker.io/erlang:${OTP_VSN}-alpine AS ejabberd RUN apk -U add --no-cache \ + python3 \ + py3-pip \ + build-base \ + postgresql-dev \ + python3-dev \ autoconf \ automake \ bash \ @@ -37,6 +42,9 @@ RUN apk -U add --no-cache \ yaml-dev \ zlib-dev +# Install Python packages globally +RUN pip3 install --no-cache-dir --break-system-packages bcrypt psycopg2 + ARG ELIXIR_VSN RUN wget -O - https://github.com/elixir-lang/elixir/archive/v$ELIXIR_VSN.tar.gz \ | tar -xzf - @@ -171,6 +179,15 @@ RUN apk -U upgrade --available --no-cache \ && rm /tmp/runDeps \ && ln -fs /usr/lib/libtdsodbc.so.0 /usr/lib/libtdsodbc.so +RUN apk -U add --no-cache \ + python3 \ + py3-pip \ + build-base \ + postgresql-dev \ + python3-dev +# Install Python packages globally +RUN pip3 install --no-cache-dir --break-system-packages bcrypt psycopg2 + ARG USER ARG UID ARG HOME