Commits (2)
# Dockerfile for Debian Contributors website backend
# Copyright (C) 2015 Simó Albert i Beltran <>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# GNU Affero General Public License for more details.
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <>.
FROM debian
MAINTAINER Simó Albert i Beltran
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install -y \
python-django \
python-ldap \
python-debiancontributors \
eatmydata \
git \
COPY ./ /srv/dc/
WORKDIR /srv/dc/
# Waiting for django-housekeeping package:
RUN git clone /srv/django-housekeeping \
&& cd /srv/django-housekeeping/ \
&& python ./ install
RUN cp dc/ dc/
RUN ./ migrate
RUN curl | eatmydata ./ import_sources
CMD eatmydata ./ runserver
......@@ -5,6 +5,50 @@ See for this project's page
## Running this code on your own machine
### Docker (WIP)
You can run a Docker container:
# install docker
sudo apt-get install
# get the source code
git clone
cd dc
# build the image
docker build -t dc .
# run container
docker run --name=debian_contributors -d -p 8000:8000 dc
Check it out at http://localhost:8000
Stop and remove the container:
docker stop debian_contributors
docker rm debian_contributors
Run with your own code:
# create configuration file, see also "Configuration" section above
cp dc/ dc/
editor dc/ # edit as needed
# run container with the code of host
docker run --name=mydc -d -v $PWD:/srv/dc -p 8000:8000 dc
# create database on host filesystem, see also "First setup" section above
docker exec mydc ./ migrate
Add your source at http://localhost:8000/sources/ or add some sources from, see also "Fill in data" section above:
# get the sources.json
curl -o sources.json
# import it
docker exec mydc eatmydata ./ import_sources sources.json
Check the sources at http://localhost:8000/sources/
Get an interactive console:
docker exec -it mydc bash
### Dependencies
apt-get install python-django python-ldap python-debiancontributors eatmydata