mirror of
https://github.com/kemayo/leech
synced 2025-12-06 08:22:56 +01:00
Simplify Dockerfile
Replace intervenining container with just disabling virtualenvs installing via poetry.
This commit is contained in:
parent
98b4622bd5
commit
674a5b7e6b
1 changed files with 7 additions and 13 deletions
20
Dockerfile
20
Dockerfile
|
|
@ -1,25 +1,19 @@
|
|||
FROM alpine:latest as install
|
||||
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
|
||||
|
||||
FROM install as poetry
|
||||
|
||||
# We don't need poetry in the final container.
|
||||
RUN pip install poetry
|
||||
libxcb-dev libpng-dev gcc musl-dev python3 python3-dev py3-pip py3-cryptography \
|
||||
&& pip install poetry
|
||||
|
||||
COPY . /leech
|
||||
|
||||
RUN cd /leech && poetry export > requirements.txt
|
||||
|
||||
FROM install
|
||||
|
||||
COPY --from=poetry /leech /leech
|
||||
RUN pip3 install -r /leech/requirements.txt
|
||||
RUN cd /leech \
|
||||
&& poetry config virtualenvs.create false \
|
||||
&& poetry install --no-dev
|
||||
|
||||
WORKDIR /work
|
||||
|
||||
ENTRYPOINT ["/leech/leech.py"]
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue