1131
Comment: initial attempt at dockerfile. I'd be surprised if this one will work, just saving so I have a baseline.
|
2112
putting some titles in to make the page more formatted.
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
This is a scratchpad for a Dockerfile: | This page is a scratchpad for Terri's Dockerfile, which sets up a very default version of Mailman in your container so that you can try out Mailman 3 suite. Suggestions and instructions for use welcome! |
Line 3: | Line 3: |
== The Mailman 3 Suite Dockerfile == |
|
Line 4: | Line 6: |
Line 5: | Line 8: |
# Dockerfile to setup GNU Mailman Suite | # Dockerfile to setup GNU Mailman Suite |
Line 12: | Line 15: |
MAINTAINER Terri | MAINTAINER Terri Oda |
Line 16: | Line 19: |
RUN apt-get install bzr python3-dev python3-pip python-dev python-pip python-virtualenv | RUN apt-get install -y bzr python3-dev python3-pip python-dev python-pip python-virtualenv |
Line 19: | Line 22: |
RUN apt-get install nodejs npm | RUN apt-get install -y nodejs npm |
Line 36: | Line 39: |
RUN source venv/bin/activate | RUN . venv/bin/activate |
Line 39: | Line 42: |
EXPOSE 80 | EXPOSE 8000 |
Line 45: | Line 48: |
RUN ./bin/mailman-web-django-admin runserver & | |
Line 47: | Line 49: |
# This sets the django webserver up to not only run, but binds it to all interfaces, port 8000 ENTRYPOINT ./bin/mailman-web-django-admin runserver 0.0.0.0:8000 |
|
Line 48: | Line 52: |
== Building the docker image == Copy the content above into a file named `Dockerfile` in a directory, and then run the following command: {{{ sudo docker build -t mailman . }}} This will take some time to build a docker image with the required steps. == Starting the container and mailman3 suite == {{{ sudo docker run mailman }}} Then find out the container id by following command {{{ sudo docker ps }}} This will start the mailman docker container. You can find out the ip from *$ sudo docker inspect hash_of_docker" For example I can open "http://172.17.0.15:8000/" in my browser to view Mailman3. |
This page is a scratchpad for Terri's Dockerfile, which sets up a very default version of Mailman in your container so that you can try out Mailman 3 suite. Suggestions and instructions for use welcome!
The Mailman 3 Suite Dockerfile
######################################### # Dockerfile to setup GNU Mailman Suite # Based on Ubuntu ######################################### # Set the base image to Ubuntu FROM ubuntu # File Author / Maintainer MAINTAINER Terri Oda # Update the sources and install some basic python stuff RUN apt-get update RUN apt-get install -y bzr python3-dev python3-pip python-dev python-pip python-virtualenv # Get the nodejs stuff RUN apt-get install -y nodejs npm RUN npm install -g less RUN ln -s /usr/bin/nodejs /usr/bin/node # Set the default directory where CMD will execute WORKDIR /mailman3 # Get Mailman Bundler RUN bzr branch lp:mailman-bundler # Get buildout, go into Mailman Bundler and build RUN pip install zc.buildout WORKDIR /mailman3/mailman-bundler RUN buildout # Set up virtualenv RUN virtualenv venv RUN . venv/bin/activate # Expose ports EXPOSE 8000 # Prep some stuff RUN ./bin/mailman-post-update RUN ./bin/mailman-web-django-admin createsuperuser RUN ./bin/mailman start # This sets the django webserver up to not only run, but binds it to all interfaces, port 8000 ENTRYPOINT ./bin/mailman-web-django-admin runserver 0.0.0.0:8000
Building the docker image
Copy the content above into a file named Dockerfile in a directory, and then run the following command:
sudo docker build -t mailman .
This will take some time to build a docker image with the required steps.
Starting the container and mailman3 suite
sudo docker run mailman
Then find out the container id by following command
sudo docker ps
This will start the mailman docker container. You can find out the ip from *$ sudo docker inspect hash_of_docker" For example I can open "http://172.17.0.15:8000/" in my browser to view Mailman3.