Last active
November 28, 2016 09:13
-
-
Save tyage/833389872d381df99230ee2c9681ddff to your computer and use it in GitHub Desktop.
mailman3 dockerfile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# fork from: https://wiki.list.org/DEV/Mailman%203.0/Mailman%203.0%20Suite%20Dockerfile | |
######################################### | |
# Dockerfile to setup GNU Mailman Suite | |
# Based on Ubuntu | |
######################################### | |
# Set the base image to Ubuntu | |
FROM ubuntu | |
# File Author / Maintainer | |
MAINTAINER tyage | |
# Update the sources and install some basic python stuff | |
RUN apt-get update && \ | |
apt-get install -y git gcc make openssl libssl-dev libbz2-dev libreadline-dev libsqlite3-dev curl ruby-sass | |
# Set the default directory where CMD will execute | |
WORKDIR /mailman3 | |
ENV HOME /root | |
ENV PYENV_ROOT $HOME/.pyenv | |
ENV PATH $PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH | |
RUN git clone https://github.com/yyuu/pyenv.git $HOME/.pyenv && \ | |
pyenv install 3.4.5 && \ | |
pyenv install 2.7.12 && \ | |
pyenv global 2.7.12 3.4.5 && \ | |
pyenv rehash | |
# Get Mailman Bundler | |
RUN git clone https://gitlab.com/mailman/mailman-bundler.git | |
# Get buildout, go into Mailman Bundler and build | |
RUN pip install --upgrade virtualenv && \ | |
pip install zc.buildout | |
WORKDIR /mailman3/mailman-bundler | |
RUN buildout | |
# Set up virtualenv | |
RUN virtualenv venv | |
RUN . venv/bin/activate | |
# Expose ports | |
EXPOSE 8000 | |
RUN ./bin/mailman-post-update | |
# It needs tty? | |
RUN ./bin/mailman-web-django-admin createsuperuser | |
ENTRYPOINT ./bin/mailman start && ./bin/mailman-web-django-admin runserver 0.0.0.0:8000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment