Merge 'Fixed Dockerfile'

Reviewed-on: https://zotify.xyz/zotify/zotify/pulls/1
This commit is contained in:
Zotify 2023-04-30 13:07:34 +02:00
commit 0604056667
2 changed files with 10 additions and 7 deletions

View File

@ -3,16 +3,19 @@ FROM python:3.9-alpine as base
RUN apk --update add ffmpeg RUN apk --update add ffmpeg
FROM base as builder FROM base as builder
RUN mkdir /install
WORKDIR /install WORKDIR /install
COPY requirements.txt /requirements.txt 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 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 COPY zotify /app/zotify
WORKDIR /app WORKDIR /app
ENTRYPOINT ["python3", "-m", "zotify"] CMD ["python3", "-m", "zotify"]

View File

@ -115,12 +115,12 @@ Bangers/{artist} - {song_name}.{ext}
/home/user/downloads/{artist} - {song_name} [{id}].{ext} /home/user/downloads/{artist} - {song_name} [{id}].{ext}
~~~~ ~~~~
### Docker Usage - CURRENTLY BROKEN ### Docker Usage
``` ```
Build the docker image from the Dockerfile: Build the docker image from the Dockerfile:
docker build -t zotify . docker build -t zotify .
Create and run a container from the image: 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"? ### What do I do if I see "Your session has been terminated"?