Migrate mailman-web to Alpine
This commit is contained in:
@@ -1,34 +1,33 @@
|
|||||||
FROM python:2.7
|
FROM python:2.7-alpine3.6
|
||||||
|
|
||||||
MAINTAINER Abhilash Raj
|
MAINTAINER Abhilash Raj
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
# Add needed files for uwsgi server + settings for django
|
||||||
# Add needed files for uwsgi server + settings for django
|
|
||||||
ADD mailman-web /opt/mailman-web
|
ADD mailman-web /opt/mailman-web
|
||||||
# Add startup script to container
|
# Add startup script to container
|
||||||
ADD assets/run.sh /opt/run.sh
|
ADD assets/run.sh /opt/run.sh
|
||||||
|
|
||||||
# Install packages and dependencies for postorius and hyperkitty
|
# 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
|
# Add user for executing apps, change ownership for uwsgi+django files and set execution rights for management script
|
||||||
RUN apt-get update \
|
RUN set -ex \
|
||||||
&& apt-get install -y --no-install-recommends ruby-sass \
|
&& apk add --no-cache --virtual .build-deps gcc libc-dev linux-headers postgresql-dev \
|
||||||
wget \
|
&& apk add --no-cache --virtual .mailman-rundeps bash sassc postgresql-client \
|
||||||
postgresql-client \
|
&& pip install -U mailmanclient==3.1.0 \
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
postorius==1.1.0 \
|
||||||
&& python -m pip install -U mailmanclient==3.1.0 \
|
hyperkitty==1.1.0 \
|
||||||
postorius==1.1.0 \
|
django-mailman3==1.1.0 \
|
||||||
hyperkitty==1.1.0 \
|
whoosh \
|
||||||
django-mailman3==1.1.0 \
|
uwsgi \
|
||||||
whoosh \
|
psycopg2 \
|
||||||
uwsgi \
|
dj-database-url \
|
||||||
psycopg2 \
|
pymysql \
|
||||||
dj-database-url \
|
&& pip install -U django==1.10 \
|
||||||
pymysql \
|
&& apk del --no-cache .build-deps \
|
||||||
&& python -m pip install -U django==1.10 \
|
&& addgroup -S mailman \
|
||||||
&& useradd -M -U -u 1000 mailman \
|
&& adduser -S -G mailman mailman \
|
||||||
&& chmod u+x /opt/run.sh \
|
&& chmod u+x /opt/run.sh \
|
||||||
&& chown mailman /opt/mailman-web/* \
|
&& chown -R mailman /opt/mailman-web/ \
|
||||||
&& chmod u+x /opt/mailman-web/manage.py
|
&& chmod u+x /opt/mailman-web/manage.py
|
||||||
|
|
||||||
WORKDIR /opt/mailman-web
|
WORKDIR /opt/mailman-web
|
||||||
|
|
||||||
@@ -39,4 +38,4 @@ EXPOSE 8000 8080
|
|||||||
STOPSIGNAL SIGINT
|
STOPSIGNAL SIGINT
|
||||||
|
|
||||||
ENTRYPOINT ["/opt/run.sh"]
|
ENTRYPOINT ["/opt/run.sh"]
|
||||||
CMD ["uwsgi", "--ini", "/opt/mailman-web/uwsgi.ini"]
|
CMD ["uwsgi", "--ini", "/opt/mailman-web/uwsgi.ini"]
|
||||||
|
|||||||
Reference in New Issue
Block a user