The libldap package is not installed in the mailman-web:0.5 and postorius images despite being listed as a dependency in the Dockerfile. This issue arises because libldap is included in the .build-deps virtual package group, which is removed at the end of the build process, causing the package to be uninstalled. This commit addresses the issue by moving libldap from the .build-deps virtual package group to the .mailman-rundeps virtual package group in both the web and postorius Dockerfiles. This ensures that libldap remains installed in the final image, as it is now part of the runtime dependencies. Changes: - Move libldap installation from .build-deps to .mailman-rundeps in postorius/Dockerfile and postorius/Dockerfile.env; - Move libldap installation from .build-deps to .mailman-rundeps in web/Dockerfile and web/Dockerfile.env. These changes are necessary to ensure that the libldap package is available in the running containers, preventing runtime errors related to missing LDAP dependencies. Signed-off-by: Antonio Rocco <8lue@8lue.xyz>
55 lines
1.8 KiB
Docker
55 lines
1.8 KiB
Docker
# syntax = docker/dockerfile:1.3
|
|
FROM alpine:3.20.0
|
|
|
|
ARG POSTORIUS_REF
|
|
ARG DJ_MM3_REF
|
|
ARG CLIENT_REF
|
|
|
|
# Install packages and dependencies for postorius and hyperkitty Add user for
|
|
# executing apps, change ownership for uwsgi+django files and set execution
|
|
# rights for management script
|
|
RUN --mount=type=cache,target=/root/.cache \
|
|
set -ex \
|
|
&& apk add --no-cache --virtual .build-deps gcc libc-dev linux-headers \
|
|
postgresql-dev mariadb-dev mariadb-connector-c python3-dev libffi-dev git cargo rust \
|
|
&& apk add --no-cache --virtual .mailman-rundeps bash sassc tzdata libldap \
|
|
postgresql-client mysql-client py3-mysqlclient curl mailcap \
|
|
python3 py3-pip libffi gettext py-cryptography \
|
|
&& python3 -m pip install --break-system-packages -U pip setuptools wheel \
|
|
&& python3 -m pip install --break-system-packages -U \
|
|
git+https://gitlab.com/mailman/mailmanclient \
|
|
git+https://gitlab.com/mailman/postorius \
|
|
uwsgi \
|
|
psycopg2 \
|
|
dj-database-url \
|
|
mysqlclient \
|
|
typing \
|
|
django-utils-six \
|
|
&& python3 -m pip install --break-system-packages -U 'Django<4.3' \
|
|
&& python3 -m pip install --break-system-packages -U \
|
|
git+https://gitlab.com/mailman/django-mailman3 \
|
|
&& apk del .build-deps \
|
|
&& addgroup -S mailman \
|
|
&& adduser -S -G mailman mailman
|
|
|
|
# Add needed files for uwsgi server + settings for django
|
|
COPY mailman-web /opt/mailman-web
|
|
# Add startup script to container
|
|
COPY docker-entrypoint.sh /usr/local/bin/
|
|
|
|
RUN chown -R mailman /opt/mailman-web/ \
|
|
&& chmod u+x /opt/mailman-web/manage.py
|
|
|
|
WORKDIR /opt/mailman-web
|
|
|
|
# Expose port 8000 for http and port 8080 for uwsgi
|
|
# (see web/mailman-web/uwsgi.ini#L2-L4)
|
|
EXPOSE 8000 8080
|
|
|
|
# Use stop signal for uwsgi server
|
|
STOPSIGNAL SIGINT
|
|
|
|
ENTRYPOINT ["docker-entrypoint.sh"]
|
|
|
|
CMD ["uwsgi", "--ini", "/opt/mailman-web/uwsgi.ini"]
|