Merge pull request #643 from am97/main

Build optimizations
This commit is contained in:
Abhilash Raj
2023-11-13 20:23:47 +05:30
committed by GitHub
6 changed files with 39 additions and 35 deletions

View File

@@ -1,11 +1,6 @@
# syntax = docker/dockerfile:1.3
FROM alpine:3.18.4
# 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/
# 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
@@ -28,8 +23,14 @@ RUN --mount=type=cache,target=/root/.cache \
tzdata \
&& apk del .build-deps \
&& addgroup -S mailman \
&& adduser -S -G mailman mailman \
&& chown -R mailman /opt/mailman-web/ \
&& 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

View File

@@ -1,11 +1,6 @@
# syntax = docker/dockerfile:1.3
FROM alpine:3.18.4
# 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/
ARG POSTORIUS_REF
ARG DJ_MM3_REF
ARG CLIENT_REF
@@ -35,8 +30,14 @@ RUN --mount=type=cache,target=/root/.cache \
git+https://gitlab.com/mailman/django-mailman3 \
&& apk del .build-deps \
&& addgroup -S mailman \
&& adduser -S -G mailman mailman \
&& chown -R mailman /opt/mailman-web/ \
&& 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