diff --git a/Dockerfile b/Dockerfile index f95bd03..1afe483 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,16 +3,19 @@ FROM python:3.9-alpine as base RUN apk --update add ffmpeg FROM base as builder -RUN mkdir /install + 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"] 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"?