Dockerfile 546 B

123456789101112131415
  1. FROM alpine:3.11
  2. ARG SCRAPY_PACKAGE_VERSION=1.8.0-r0
  3. ARG SCRAPY_PACKAGE_REPOSITORY=http://dl-cdn.alpinelinux.org/alpine/edge/testing
  4. RUN apk add --no-cache --repository $SCRAPY_PACKAGE_REPOSITORY \
  5. py3-scrapy=$SCRAPY_PACKAGE_VERSION \
  6. && adduser -S spider
  7. USER spider
  8. # > pkg_resources.DistributionNotFound: The 'protego>=0.1.15' distribution was not found and is required by Scrapy
  9. ARG PROTEGO_VERSION=0.1.16
  10. RUN pip3 install --user protego==$PROTEGO_VERSION
  11. COPY ./ping.py /ping.py
  12. ENTRYPOINT ["scrapy", "runspider", "/ping.py"]