mirror of
https://github.com/kemayo/leech
synced 2025-12-29 03:34:59 +01:00
commit
41bbe46399
2 changed files with 34 additions and 0 deletions
19
Dockerfile
Normal file
19
Dockerfile
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
FROM alpine:latest
|
||||
|
||||
# Package list taken from Pillow documentation:
|
||||
# https://pillow.readthedocs.io/en/stable/installation.html#building-on-linux
|
||||
RUN apk add tiff-dev jpeg-dev openjpeg-dev zlib-dev freetype-dev lcms2-dev \
|
||||
libwebp-dev tcl-dev tk-dev harfbuzz-dev fribidi-dev libimagequant-dev \
|
||||
libxcb-dev libpng-dev gcc musl-dev python3 python3-dev py3-pip py3-cryptography \
|
||||
&& pip install poetry
|
||||
|
||||
COPY . /leech
|
||||
|
||||
RUN cd /leech \
|
||||
&& poetry config virtualenvs.create false \
|
||||
&& poetry install --no-dev
|
||||
|
||||
WORKDIR /work
|
||||
|
||||
ENTRYPOINT ["/leech/leech.py"]
|
||||
|
||||
|
|
@ -127,6 +127,21 @@ Adding new site handers
|
|||
|
||||
To add support for a new site, create a file in the `sites` directory that implements the `Site` interface. Take a look at `ao3.py` for a minimal example of what you have to do.
|
||||
|
||||
Docker
|
||||
---
|
||||
|
||||
You can build the project's Docker container like this:
|
||||
|
||||
```shell
|
||||
docker build . -t kemayo/leech:snapshot
|
||||
```
|
||||
|
||||
The container's entrypoint runs `leech` directly and sets the current working directory to `/work`, so you can mount any directory there:
|
||||
|
||||
```shell
|
||||
docker run -it --rm -v ${DIR}:/work kemayo/leech:snapshot download [[URL]]
|
||||
```
|
||||
|
||||
Contributing
|
||||
---
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue