Skip to content

Commit

Permalink
one more attempt to fix Docker builds
Browse files Browse the repository at this point in the history
they are failing because pycparser has issues with --no-cache-dir
solution picked from pypa/pip#6158 (comment)
  • Loading branch information
boogheta committed Jan 30, 2019
1 parent be0ef8e commit 0e4b457
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ ENV PYTHONPATH $PYTHONPATH:/app
COPY requirements.txt /app/requirements.txt

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

Expand Down
11 changes: 6 additions & 5 deletions hyphe_backend/crawler/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ FROM python:2.7-alpine
COPY requirements-global-scrapyd.txt /requirements-global-scrapyd.txt

RUN apk --update add gcc musl-dev libffi-dev openssl-dev libxml2-dev libxslt-dev \
&& pip install --upgrade setuptools pip \
&& pip install --no-use-pep517 --no-cache-dir -r requirements-global-scrapyd.txt \
&& pip install --no-cache-dir Scrapy==0.24.6 \
&& pip install --no-cache-dir scrapyd==1.0.1 \
&& pip install --cache-dir=/tmp/pipcache --upgrade setuptools pip \
&& pip install --cache-dir=/tmp/pipcache -r requirements-global-scrapyd.txt \
&& pip install --cache-dir=/tmp/pipcache Scrapy==0.24.6 \
&& pip install --cache-dir=/tmp/pipcache scrapyd==1.0.1 \
&& rm -r /tmp/pipcache \
&& apk del gcc musl-dev \
&& rm /var/cache/apk/*
&& rm /var/cache/apk/*

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

Expand Down

0 comments on commit 0e4b457

Please sign in to comment.