Skip to content

Commit 0e4b457

Browse files
committed
one more attempt to fix Docker builds
they are failing because pycparser has issues with --no-cache-dir solution picked from pypa/pip#6158 (comment)
1 parent be0ef8e commit 0e4b457

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ ENV PYTHONPATH $PYTHONPATH:/app
77
COPY requirements.txt /app/requirements.txt
88

99
RUN apk --update add gcc git musl-dev libxml2-dev libxslt-dev libffi-dev openssl-dev \
10-
&& pip install --upgrade setuptools pip \
11-
&& pip install --no-cache-dir --requirement /app/requirements.txt \
12-
&& pip install --no-cache-dir Scrapy==0.24.6 \
10+
&& pip install --cache-dir=/tmp/pipcache --upgrade setuptools pip \
11+
&& pip install --cache-dir=/tmp/pipcache --requirement /app/requirements.txt \
12+
&& pip install --cache-dir=/tmp/pipcache Scrapy==0.24.6 \
13+
&& rm -r /tmp/pipcache \
1314
&& apk del gcc git musl-dev \
1415
&& rm /var/cache/apk/*
1516

hyphe_backend/crawler/Dockerfile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ FROM python:2.7-alpine
33
COPY requirements-global-scrapyd.txt /requirements-global-scrapyd.txt
44

55
RUN apk --update add gcc musl-dev libffi-dev openssl-dev libxml2-dev libxslt-dev \
6-
&& pip install --upgrade setuptools pip \
7-
&& pip install --no-use-pep517 --no-cache-dir -r requirements-global-scrapyd.txt \
8-
&& pip install --no-cache-dir Scrapy==0.24.6 \
9-
&& pip install --no-cache-dir scrapyd==1.0.1 \
6+
&& pip install --cache-dir=/tmp/pipcache --upgrade setuptools pip \
7+
&& pip install --cache-dir=/tmp/pipcache -r requirements-global-scrapyd.txt \
8+
&& pip install --cache-dir=/tmp/pipcache Scrapy==0.24.6 \
9+
&& pip install --cache-dir=/tmp/pipcache scrapyd==1.0.1 \
10+
&& rm -r /tmp/pipcache \
1011
&& apk del gcc musl-dev \
11-
&& rm /var/cache/apk/*
12+
&& rm /var/cache/apk/*
1213

1314
COPY scrapyd.config /etc/scrapyd/conf.d/100-hyphe
1415

0 commit comments

Comments
 (0)