2 Commits 5b609557e9 ... edbf268edc

Author SHA1 Message Date
  Fabian Peter Hammerle edbf268edc added missing dependency protego 4 years ago
  Fabian Peter Hammerle 20344cb29a base image: debian:stretch-slim -> alpine:3.11 4 years ago
2 changed files with 22 additions and 3 deletions
  1. 13 0
      CHANGELOG.md
  2. 9 3
      Dockerfile

+ 13 - 0
CHANGELOG.md

@@ -0,0 +1,13 @@
+# Changelog
+All notable changes to this project will be documented in this file.
+
+The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
+and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+
+## Unreleased
+### Changed
+- base image: `debian:stretch-slim` -> `alpine:3.11`
+
+## 0.2 - 2018-11-03
+
+## 0.1 - 2018-11-03

+ 9 - 3
Dockerfile

@@ -1,9 +1,15 @@
-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
 USER spider
+# > pkg_resources.DistributionNotFound: The 'protego>=0.1.15' distribution was not found and is required by Scrapy
+ARG PROTEGO_VERSION=0.1.16
+RUN pip3 install --user protego==$PROTEGO_VERSION
 
 
 COPY ./ping.py /ping.py
 COPY ./ping.py /ping.py
 ENTRYPOINT ["scrapy", "runspider", "/ping.py"]
 ENTRYPOINT ["scrapy", "runspider", "/ping.py"]