|
@@ -1,9 +1,11 @@
|
|
|
-FROM debian:stretch-slim
|
|
|
+FROM alpine:3.11
|
|
|
|
|
|
-RUN apt-get update && apt-get install --yes python-scrapy
|
|
|
+ARG SCRAPY_PACKAGE_VERSION=1.8.0-r0
|
|
|
+ARG SCRAPY_PACKAGE_REPOSITORY=http://dl-cdn.alpinelinux.org/alpine/edge/testing
|
|
|
+RUN apk add --no-cache --repository $SCRAPY_PACKAGE_REPOSITORY \
|
|
|
+ py3-scrapy=$SCRAPY_PACKAGE_VERSION \
|
|
|
+ && adduser -S spider
|
|
|
|
|
|
-RUN useradd spider
|
|
|
USER spider
|
|
|
-
|
|
|
COPY ./ping.py /ping.py
|
|
|
ENTRYPOINT ["scrapy", "runspider", "/ping.py"]
|