1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-22 02:32:33 +01:00

[docker] update Dockerfile

- add LANG=C.UTF-8
  (better utf-8 support or so I heard)
- restructure RUN commands to be more easily extendable and have
  simpler git diffs
- swap 'apk' and 'pip' since 'apk' results are more likely to be stable
  and therefore cacheable
- disable Python bytecode caching with -B
  - reduces image size by 10Mb
  - bytecode for explicitly installed packages (gallery-dl, yt-dlp,
    dependencies) is still cached
- add some (hopefully) helpful command-line arguments to pip
This commit is contained in:
Mike Fährmann 2024-03-05 02:57:30 +01:00
parent 461b55da4b
commit 96af12cec2
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -1,7 +1,19 @@
FROM python:alpine FROM python:alpine
RUN python3 -m pip install --no-cache-dir -U pip && \ ENV LANG=C.UTF-8
python3 -m pip install --no-cache-dir -U gallery-dl yt-dlp
RUN apk update && \ RUN : \
apk add --no-cache ffmpeg && \ && apk --no-interactive update \
rm -rf /var/cache/apk/* && apk --no-cache --no-interactive add ffmpeg \
&& rm -rf /var/cache/apk \
&& :
RUN : \
&& python3 -B -m pip --no-cache-dir --no-input --disable-pip-version-check install -U \
pip \
&& python3 -B -m pip --no-cache-dir --no-input --disable-pip-version-check install -U \
gallery-dl \
yt-dlp \
&& rm -rf /root/.cache/pip \
&& :
ENTRYPOINT [ "gallery-dl" ] ENTRYPOINT [ "gallery-dl" ]