1+ # -*- shell-mode -*-
12# This file is a docker (https://www.docker.com/what-docker) recipe, which can be used to build
23# a docker image which is ready to run a datatracker in development mode.
34#
@@ -32,7 +33,6 @@ ENV DEBIAN_FRONTEND=noninteractive
3233
3334# Install needed packages
3435RUN apt-get update && apt-get install -qy \
35- apt-utils \
3636 ca-certificates \
3737 gawk \
3838 less \
@@ -45,45 +45,33 @@ RUN apt-get update && apt-get install -qy \
4545 pv \
4646 python \
4747 python-dev \
48+ python-m2crypto \
4849 subversion/wheezy-backports \
4950 wget \
5051 && apt-get clean \
5152 && rm -rf /var/lib/apt/lists/*
5253
54+ # Set up root password
55+ RUN echo "root:codesprint" | chpasswd
56+
5357# MySQL
5458VOLUME /var/lib/mysql
5559
5660# Pip
5761ENV PYTHONWARNINGS="ignore:a true SSLContext object"
5862WORKDIR /usr/src
59- RUN wget -q https://bootstrap.pypa.io/get-pip.py
60- RUN python get-pip.py
61- RUN pip --version
63+ RUN wget -q https://bootstrap.pypa.io/get-pip.py && python get-pip.py && rm get-pip.py
6264RUN pip install virtualenv
6365
6466# idnits and dependencies
65- RUN wget -q -P /usr/local/bin/ https://tools.ietf.org/tools/idnits/idnits
66- RUN chmod +x /usr/local/bin/idnits
67-
68- # A default user
69- RUN useradd -m -s /bin/bash -u 500 django
70- USER django
71- WORKDIR /home/django
72-
73- # Check out trunk, in order to verify setup by running tests
74- RUN mkdir -p ~/src
75- WORKDIR /home/django/src
76- RUN svn co https://svn.tools.ietf.org/svn/tools/ietfdb/trunk trunk
77-
78- # Set up a virtualenv, install requirements, run tests
79- WORKDIR /home/django/src/trunk
80- RUN virtualenv .
81- RUN . bin/activate; pip install -r requirements.txt
82- COPY settings_local.py ./settings_local.py
83- RUN . bin/activate; ietf/manage.py test --settings=settings_sqlitetest
67+ RUN wget -q -P /usr/local/bin/ https://tools.ietf.org/tools/idnits/idnits && chmod +x /usr/local/bin/idnits
8468
85- USER root
86- WORKDIR /
69+ ENV DDIR="/usr/local/share/datatracker"
70+ RUN mkdir -p $DDIR
71+ WORKDIR $DDIR
72+ COPY requirements.txt ./
73+ COPY settings_local.py ./
74+ RUN pip install -r requirements.txt
8775
8876COPY docker-init.sh /docker-init.sh
8977ENTRYPOINT ["/docker-init.sh" ]
0 commit comments