Move the mailman-core image to apline linux

This commit is contained in:
Abhilash Raj
2017-04-25 16:58:32 -07:00
committed by Abhilash Raj
parent 2e2b510364
commit 2857394872
2 changed files with 16 additions and 11 deletions

View File

@@ -1,15 +1,18 @@
FROM python:3.5 FROM python:3.6-alpine
MAINTAINER Abhilash Raj MAINTAINER Abhilash Raj
ENV DEBIAN_FRONTEND=noninteractive
# Install the latest master branch of the mailman directly # Install the latest master branch of the mailman directly
# from the Gitlab. # from the Gitlab.
RUN apt-get update && apt-get install -y postgresql-client wget \ RUN apk update \
&& wget -O mailman.zip https://gitlab.com/mailman/mailman/repository/archive.zip?ref=master \ && apk add --virtual build-deps gcc python3-dev musl-dev wget \
&& apk add postgresql-dev bash
RUN wget -O mailman.zip https://gitlab.com/mailman/mailman/repository/archive.zip?ref=master \
&& wget -O mailman_hyperkitty.zip https://gitlab.com/mailman/mailman-hyperkitty/repository/archive.zip?ref=master \ && wget -O mailman_hyperkitty.zip https://gitlab.com/mailman/mailman-hyperkitty/repository/archive.zip?ref=master \
&& pip install mailman.zip mailman_hyperkitty.zip ipython psycopg2 \ && pip install mailman.zip mailman_hyperkitty.zip psycopg2 \
&& rm mailman.zip mailman_hyperkitty.zip && rm mailman.zip mailman_hyperkitty.zip \
&& apk del build-deps
ADD assets/run.sh /opt/run.sh ADD assets/run.sh /opt/run.sh

View File

@@ -15,11 +15,13 @@ function wait_for_postgres () {
# moving forward. # moving forward.
# TODO: Use python's psycopg2 module to do this in python instead of # TODO: Use python's psycopg2 module to do this in python instead of
# installing postgres-client in the image. # installing postgres-client in the image.
until psql $DATABASE_URL -c '\l'; do # until psql $DATABASE_URL -c '\l'; do
>&2 echo "Postgres is unavailable - sleeping" # >&2 echo "Postgres is unavailable - sleeping"
sleep 1 # sleep 1
done # done
>&2 echo "Postgres is up - continuing" # >&2 echo "Postgres is up - continuing"
sleep 10
# TODO: Just sleep and do not require postgres client for the image maybe.
} }