FROM python:3.12.3-alpine # set version label ARG DOCKER_IMAGE_CREATED ARG VERSION LABEL build_version="pyload docker version:- ${VERSION} Build-date:- ${DOCKER_IMAGE_CREATED}" # add local files COPY *.patch root/ / RUN \ wget https://nexus.nyyu.dev/repository/files/alpine/7zip-23.01-r0.apk && \ apk add --no-cache --allow-untrusted 7zip*.apk && \ rm -f 7zip*.apk && \ echo "**** install build packages ****" && \ apk add --no-cache --virtual=build-dependencies \ build-base \ curl-dev \ patch && \ echo "**** install packages ****" && \ apk add --no-cache \ tini su-exec shadow \ curl \ 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 --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/* \ /*.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"]