From 2f09979d4054784ca8ffa4e7898a01b50d0760ed Mon Sep 17 00:00:00 2001 From: Tony Grosinger Date: Thu, 7 Nov 2019 06:44:36 -0800 Subject: [PATCH] Add dockerfile and fix dependencies - One dependency was missing - Dockerfile simplifies creating an environment where this script can run --- Dockerfile | 16 ++++++++++++++++ requirements.txt | 1 + 2 files changed, 17 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..da38538 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +FROM alpine:3.10 + +WORKDIR /code + +COPY requirements.txt /code/requirements.txt + +RUN apk add --no-cache --virtual py-build-deps gcc libc-dev libxslt-dev python3-dev && \ + apk add --no-cache python3 libxslt && \ + pip3 install -r requirements.txt && \ + apk del py-build-deps + +# Copy this after installing since it changes the most frequently, to take +# advantage of the image layer caching. +COPY dl.py /code/dl.py + +ENTRYPOINT ["python3", "dl.py"] diff --git a/requirements.txt b/requirements.txt index f236751..3421e25 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ opml feedparser youtube-dl +python-dateutil