From 52a263aa201b4c7ea234905d6b7eae7343265535 Mon Sep 17 00:00:00 2001 From: Gabe Date: Tue, 25 Apr 2023 09:57:54 +0000 Subject: [PATCH 1/3] Updated Dockerfile --- Dockerfile | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index f95bd03..644397e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,16 +3,21 @@ FROM python:3.9-alpine as base RUN apk --update add ffmpeg FROM base as builder -RUN mkdir /install + +RUN apk --update add git + WORKDIR /install COPY requirements.txt /requirements.txt -RUN apk add gcc libc-dev zlib zlib-dev jpeg-dev \ - && pip install --prefix="/install" -r /requirements.txt +RUN apk add gcc libc-dev zlib zlib-dev jpeg-dev +RUN pip install --prefix="/install" -r /requirements.txt FROM base -COPY --from=builder /install /usr/local +COPY --from=builder /install /usr/local/lib/python3.9/site-packages +RUN mv /usr/local/lib/python3.9/site-packages/lib/python3.9/site-packages/* /usr/local/lib/python3.9/site-packages/ + COPY zotify /app/zotify + WORKDIR /app -ENTRYPOINT ["python3", "-m", "zotify"] +CMD ["python3", "-m", "zotify"] From c6485a3ae50e60a7a9d68f166b2899eea028f931 Mon Sep 17 00:00:00 2001 From: Gabe Date: Tue, 25 Apr 2023 10:03:26 +0000 Subject: [PATCH 2/3] Removed git dependency in build stage --- Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 644397e..1afe483 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,8 +4,6 @@ RUN apk --update add ffmpeg FROM base as builder -RUN apk --update add git - WORKDIR /install COPY requirements.txt /requirements.txt From e72fb18eb15ab3c5a988d772284bce1a7f44b86d Mon Sep 17 00:00:00 2001 From: Zotify Date: Sun, 30 Apr 2023 13:06:09 +0200 Subject: [PATCH 3/3] Update 'README.md' --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1e78065..ec861e7 100644 --- a/README.md +++ b/README.md @@ -115,12 +115,12 @@ Bangers/{artist} - {song_name}.{ext} /home/user/downloads/{artist} - {song_name} [{id}].{ext} ~~~~ -### Docker Usage - CURRENTLY BROKEN +### Docker Usage ``` Build the docker image from the Dockerfile: docker build -t zotify . Create and run a container from the image: - docker run --rm -u $(id -u):$(id -g) -v "$PWD/zotify:/app" -v "$PWD/config.json:/config.json" -v "$PWD/Zotify Music:/Zotify Music" -v "$PWD/Zotify Podcasts:/Zotify Podcasts" -it zotify + docker run --rm -v "$PWD/Zotify Music:/root/Music/Zotify Music" -v "$PWD/Zotify Podcasts:/root/Music/Zotify Podcasts" -it zotify ``` ### What do I do if I see "Your session has been terminated"?