From 581140311616bc921a86b22a3a863e13cce9ea1d Mon Sep 17 00:00:00 2001 From: "Brian J. Cardiff" Date: Sun, 3 Dec 2017 02:34:56 -0300 Subject: [PATCH] Add docker image --- Dockerfile | 14 ++++++++++++++ README.md | 11 +++++++++++ 2 files changed, 25 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..9e6b6a9 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM python:3.6-alpine + +RUN apk add --no-cache \ + ffmpeg + +ADD requirements.txt /app/ +RUN cd /app && pip install -U -r requirements.txt + +ADD spotdl.py /app/ +ADD core/ /app/core + +WORKDIR /app + +ENTRYPOINT ["python3", "spotdl.py", "-f", "."] diff --git a/README.md b/README.md index 6c70de7..0a4a2e8 100755 --- a/README.md +++ b/README.md @@ -70,6 +70,17 @@ Assuming you have Python 3 ([preferably v3.6 or above to stay away from Unicode - Open `cmd` and type `pip install -U -r requirements.txt` to install dependencies. The same note about `pip` as for Debian, Ubuntu, Linux & Mac applies. +## Docker + +Create the docker image and use the `-s` `-p` `-l` to download single song, prepare playlist and download list file. + +``` +docker build -t ritiek/spotdl . +docker run --rm -v $(pwd):/app ritiek/spotdl -s https://open.spotify.com/track/4eSv18SwAXoQJF6tPqFIyw +docker run --rm -v $(pwd):/app ritiek/spotdl -p https://open.spotify.com/user/spotify/playlist/37i9dQZF1DX2iUghHXGIjj +docker run --rm -v $(pwd):/app ritiek/spotdl -l acoustic-blues.txt +``` + ## Instructions for Downloading Songs