forked from openstates/openstates-scrapers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile-alpine
61 lines (57 loc) · 1.95 KB
/
Dockerfile-alpine
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
FROM alpine:3.7
MAINTAINER James Turk <[email protected]>
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 apk add --no-cache --virtual .build-dependencies \
wget \
build-base \
glib \
glib-dev \
autoconf \
automake \
libtool && \
apk add --no-cache \
git \
curl \
unzip \
libressl-dev \
libffi-dev \
freetds-dev \
python \
python-dev \
python3 \
python3-dev \
py-virtualenv \
libxml2-dev \
libxslt-dev \
poppler-utils \
postgresql-dev \
mariadb-dev && \
apk add --no-cache \
--repository http://dl-cdn.alpinelinux.org/alpine/edge/main \
libressl2.7-libcrypto && \
apk add --no-cache \
--repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \
gdal-dev \
geos-dev && \
cd /tmp && \
wget "https://github.com/brianb/mdbtools/archive/0.7.1.zip" && \
unzip 0.7.1.zip && rm 0.7.1.zip && \
cd mdbtools-0.7.1 && \
autoreconf -i -f && \
./configure --disable-man && make && make install && \
cd /tmp && \
rm -rf mdbtools-0.7.1 && \
virtualenv -p $(which python2) /opt/openstates/venv-billy/ && \
/opt/openstates/venv-billy/bin/pip install -e git+https://github.com/openstates/billy.git#egg=billy && \
/opt/openstates/venv-billy/bin/pip install python-dateutil && \
virtualenv -p $(which python3) /opt/openstates/venv-pupa/ && \
/opt/openstates/venv-pupa/bin/pip install -e git+https://github.com/opencivicdata/python-opencivicdata-django.git#egg=python-opencivicdata && \
/opt/openstates/venv-pupa/bin/pip install -e git+https://github.com/opencivicdata/pupa.git#egg=pupa && \
/opt/openstates/venv-pupa/bin/pip install -r /opt/openstates/openstates/requirements.txt && \
apk del .build-dependencies
WORKDIR /opt/openstates/openstates/
ENTRYPOINT [/opt/openstates/openstates/pupa-scrape.sh]