forked from openstates/openstates-scrapers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-pupa
46 lines (38 loc) · 1.41 KB
/
Dockerfile-pupa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
FROM ubuntu:latest
MAINTAINER James Turk <[email protected]>
RUN apt-get update && apt-get install -y \
python2.7 \
python-pip \
python-lxml \
libssl-dev \
python-dev \
python3-dev \
poppler-utils \
python-virtualenv \
python3.5 \
git \
libpq-dev \
libgeos-dev \
s3cmd \
freetds-dev \
curl \
wget \
unzip \
mdbtools
RUN mkdir -p /opt/openstates/
RUN virtualenv -p $(which python2) /opt/openstates/venv-billy/
RUN /opt/openstates/venv-billy/bin/pip install -e git+https://github.com/openstates/billy.git#egg=billy
RUN /opt/openstates/venv-billy/bin/pip install python-dateutil
RUN virtualenv -p $(which python3) /opt/openstates/venv-pupa/
RUN /opt/openstates/venv-pupa/bin/pip install -e git+https://github.com/opencivicdata/python-opencivicdata-django.git#egg=python-opencivicdata
RUN /opt/openstates/venv-pupa/bin/pip install -e git+https://github.com/opencivicdata/pupa.git#egg=pupa
ENV PYTHONIOENCODING 'utf-8'
ENV LANG 'en_US.UTF-8'
ENV BILLY_ENV /opt/openstates/venv-billy/
ENV PUPA_ENV /opt/openstates/venv-pupa/
ADD . /opt/openstates/openstates
RUN find /opt/openstates/openstates -name '*.pyc' -delete
RUN /opt/openstates/venv-pupa/bin/pip install -r /opt/openstates/openstates/requirements-new.txt
RUN /opt/openstates/venv-pupa/bin/pip install ipdb
WORKDIR /opt/openstates/openstates/
ENTRYPOINT [/opt/openstates/openstates/pupa-scrape.sh]