Browse Source

run as non-privileged user

Fabian Peter Hammerle 5 years ago
parent
commit
496b08094c
2 changed files with 4 additions and 1 deletions
  1. 3 0
      Dockerfile
  2. 1 1
      README.md

+ 3 - 0
Dockerfile

@@ -2,5 +2,8 @@ FROM debian:stretch-slim
 
 RUN apt-get update && apt-get install --yes python-scrapy
 
+RUN useradd spider
+USER spider
+
 COPY ./ping.py /ping.py
 ENTRYPOINT ["scrapy", "runspider", "/ping.py"]

+ 1 - 1
README.md

@@ -1,5 +1,5 @@
 ```sh
 sudo docker run --rm fphammerle/scrapy-ping \
     --loglevel=DEBUG \
-    -a start_url=https://ipfs.fabian.hammerle.me
+    -a start_url=https://example.hammerle.me
 ```