feat: py 3.12 & cleanup
This commit is contained in:
parent
0bfc75a6de
commit
37b152d3d2
4 changed files with 86 additions and 21 deletions
32
Dockerfile
32
Dockerfile
|
@ -1,10 +1,11 @@
|
|||
FROM ghcr.io/linuxserver/baseimage-alpine:3.19
|
||||
FROM python:3.12.1-alpine
|
||||
# set version label
|
||||
ARG DOCKER_IMAGE_CREATED
|
||||
ARG VERSION
|
||||
LABEL build_version="pyload docker version:- ${VERSION} Build-date:- ${DOCKER_IMAGE_CREATED}"
|
||||
|
||||
ENV HOME="/config"
|
||||
# add local files
|
||||
COPY *.patch root/ /
|
||||
|
||||
RUN \
|
||||
wget https://nexus.nyyu.dev/repository/files/alpine/7zip-23.01-r0.apk && \
|
||||
|
@ -14,35 +15,32 @@ RUN \
|
|||
apk add --no-cache --virtual=build-dependencies \
|
||||
build-base \
|
||||
curl-dev \
|
||||
libffi-dev \
|
||||
libjpeg-turbo-dev \
|
||||
openssl-dev \
|
||||
python3-dev \
|
||||
zlib-dev && \
|
||||
patch && \
|
||||
echo "**** install packages ****" && \
|
||||
apk add --no-cache \
|
||||
tini su-exec shadow \
|
||||
curl \
|
||||
ffmpeg \
|
||||
libjpeg-turbo \
|
||||
python3 \
|
||||
py3-pip \
|
||||
sqlite \
|
||||
tesseract-ocr && \
|
||||
echo "**** install pyload ****" && \
|
||||
PYLOAD='https://github.com/pyload/pyload/archive/develop.zip#[all]' && \
|
||||
if [[ -n "${VERSION}" && "${VERSION}" != "dev" ]]; then \
|
||||
PYLOAD="pyload-ng[all]==${VERSION}"; \
|
||||
fi && \
|
||||
pip3 install --break-system-packages -U "${PYLOAD}" && \
|
||||
pip3 install --no-cache-dir --break-system-packages -U "${PYLOAD}" && \
|
||||
pip uninstall -y Js2Py && \
|
||||
cd /usr/local/lib/python3.12/site-packages/ && patch -Np1 < /py3-12.patch && cd / \
|
||||
echo "**** cleanup ****" && \
|
||||
apk del --purge \
|
||||
build-dependencies && \
|
||||
rm -rf \
|
||||
/tmp/*
|
||||
|
||||
# add local files
|
||||
COPY root/ /
|
||||
/tmp/* \
|
||||
/*.patch && \
|
||||
echo "**** add user abc ****" && \
|
||||
adduser -D -u 911 -h /config abc
|
||||
|
||||
# ports and volumes
|
||||
EXPOSE 8000
|
||||
VOLUME /config
|
||||
|
||||
ENTRYPOINT ["/sbin/tini", "--"]
|
||||
CMD ["/start.sh"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue