diff --git a/core/Dockerfile b/core/Dockerfile index 046f097..0622a33 100644 --- a/core/Dockerfile +++ b/core/Dockerfile @@ -1,15 +1,18 @@ -FROM python:3.5 +FROM python:3.6-alpine MAINTAINER Abhilash Raj -ENV DEBIAN_FRONTEND=noninteractive # Install the latest master branch of the mailman directly # from the Gitlab. -RUN apt-get update && apt-get install -y postgresql-client wget \ - && wget -O mailman.zip https://gitlab.com/mailman/mailman/repository/archive.zip?ref=master \ +RUN apk update \ + && 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 \ - && pip install mailman.zip mailman_hyperkitty.zip ipython psycopg2 \ - && rm mailman.zip mailman_hyperkitty.zip + && pip install mailman.zip mailman_hyperkitty.zip psycopg2 \ + && rm mailman.zip mailman_hyperkitty.zip \ + && apk del build-deps ADD assets/run.sh /opt/run.sh diff --git a/core/assets/run.sh b/core/assets/run.sh index 1d610f9..b8d172d 100755 --- a/core/assets/run.sh +++ b/core/assets/run.sh @@ -15,11 +15,13 @@ function wait_for_postgres () { # moving forward. # TODO: Use python's psycopg2 module to do this in python instead of # installing postgres-client in the image. - until psql $DATABASE_URL -c '\l'; do - >&2 echo "Postgres is unavailable - sleeping" - sleep 1 - done - >&2 echo "Postgres is up - continuing" + # until psql $DATABASE_URL -c '\l'; do + # >&2 echo "Postgres is unavailable - sleeping" + # sleep 1 + # done + # >&2 echo "Postgres is up - continuing" + sleep 10 + # TODO: Just sleep and do not require postgres client for the image maybe. }