-
Notifications
You must be signed in to change notification settings - Fork 29
/
Dockerfile
49 lines (37 loc) · 1.92 KB
/
Dockerfile
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
FROM frictionlessdata/datapackage-pipelines:latest-slim
RUN apt-get update --fix-missing && apt-get install -y sudo curl ssh
RUN adduser --disabled-password --home /home/dpp dpp && adduser dpp dpp && \
adduser dpp root && adduser dpp redis && adduser redis dpp && \
mkdir -p /var/datapackages && chown dpp.dpp /var/datapackages -R && chmod -R a+r /var/datapackages && \
mkdir -p /home/dpp/.ssh && chown dpp.dpp /home/dpp/.ssh -R && \
chown dpp.dpp /var/redis -R && \
chown dpp.dpp /var/log/redis -R && \
chown dpp.dpp /var/run/dpp -R && \
chmod 700 /home/dpp/.ssh && \
echo '%root ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/root
RUN mkdir -p /usr/share/man/man1 && apt-get install -y antiword poppler-utils libmagic1 default-jre-headless
RUN pip install "numpy<2" && pip install textract==1.5.0 pyquery "rfc3986<1.0" filemagic tabula-py paramiko boto3
ADD ./ /
ADD .dpp-runners.tzabar /datapackage_pipelines_budgetkey/pipelines/
RUN mv /datapackage_pipelines_budgetkey/pipelines/.dpp-runners.tzabar /datapackage_pipelines_budgetkey/pipelines/dpp-runners.yaml
RUN chown dpp.dpp /datapackage_pipelines_budgetkey -R
RUN pip install -e /
RUN pip install -U -r /requirements-dev.txt
RUN apt-get install -y sudo unzip wget libglib2.0-0 && wget https://chromedriver.storage.googleapis.com/88.0.4324.96/chromedriver_linux64.zip && \
unzip chromedriver_linux64.zip && \
chmod +x chromedriver && \
mv chromedriver /usr/local/bin/ && \
cp /certs/* /usr/local/share/ca-certificates/ && \
rm -rf /certs/ && \
cd /usr/local/share/ca-certificates/ && for i in `ls `; do ln -s $i /etc/ssl/certs/$i; done && \
update-ca-certificates --fresh
USER dpp
ENV PYTHONPATH=/
ENV DPP_PROCESSOR_PATH=/datapackage_pipelines_budgetkey/processors
ENV DPP_REDIS_HOST=localhost
ENV REDIS_USER=dpp
ENV REDIS_GROUP=dpp
ENV DPP_NUM_WORKERS=6
WORKDIR /datapackage_pipelines_budgetkey/pipelines/
EXPOSE 5000
ENTRYPOINT ["/startup.sh"]