2024-12-05 00:00:51 +01:00
|
|
|
FROM python:3.13.1-alpine
|
2022-01-24 11:20:57 -05:00
|
|
|
# set version label
|
2024-12-31 11:11:42 +01:00
|
|
|
ARG VERSION \
|
|
|
|
SEVENZIP_VERSION="24.09-r0"
|
|
|
|
ENV PIP_NO_CACHE_DIR=false \
|
|
|
|
PIP_ROOT_USER_ACTION=ignore
|
2022-01-24 11:20:57 -05:00
|
|
|
|
2024-01-06 22:12:55 +01:00
|
|
|
# add local files
|
2024-04-30 20:53:02 +02:00
|
|
|
COPY root/ /
|
2022-01-24 11:20:57 -05:00
|
|
|
|
|
|
|
RUN \
|
2024-12-31 11:11:42 +01:00
|
|
|
wget -q https://nexus.nyyu.dev/repository/files/alpine/7zip-${SEVENZIP_VERSION}.apk && \
|
|
|
|
apk add --no-cache --allow-untrusted 7zip-${SEVENZIP_VERSION}.apk && \
|
|
|
|
rm -f 7zip-${SEVENZIP_VERSION}.apk && \
|
2022-01-24 11:20:57 -05:00
|
|
|
echo "**** install packages ****" && \
|
2024-08-13 07:07:21 +02:00
|
|
|
apk add --no-cache --virtual=build-dependencies \
|
2024-12-29 08:16:10 +01:00
|
|
|
gcc musl-dev \
|
2024-08-13 07:07:21 +02:00
|
|
|
curl-dev && \
|
2022-01-24 11:20:57 -05:00
|
|
|
apk add --no-cache \
|
|
|
|
curl \
|
|
|
|
tesseract-ocr && \
|
|
|
|
echo "**** install pyload ****" && \
|
2022-11-21 11:21:08 +01:00
|
|
|
PYLOAD='https://github.com/pyload/pyload/archive/develop.zip#[all]' && \
|
|
|
|
if [[ -n "${VERSION}" && "${VERSION}" != "dev" ]]; then \
|
|
|
|
PYLOAD="pyload-ng[all]==${VERSION}"; \
|
|
|
|
fi && \
|
2024-12-31 11:11:42 +01:00
|
|
|
pip3 install -U legacy-cgi "${PYLOAD}" && \
|
|
|
|
rm -rf /usr/local/share/doc && \
|
2024-08-13 07:07:21 +02:00
|
|
|
apk del --purge \
|
|
|
|
build-dependencies && \
|
2024-01-06 22:12:55 +01:00
|
|
|
echo "**** add user abc ****" && \
|
|
|
|
adduser -D -u 911 -h /config abc
|
2022-01-24 11:20:57 -05:00
|
|
|
|
|
|
|
# ports and volumes
|
|
|
|
EXPOSE 8000
|
2024-12-31 11:11:42 +01:00
|
|
|
VOLUME /config /downloads
|
2024-01-06 22:12:55 +01:00
|
|
|
|
|
|
|
CMD ["/start.sh"]
|