docker-pyload-ng/Dockerfile

47 lines
1.3 KiB
Text
Raw Normal View History

2024-01-06 22:12:55 +01:00
FROM python:3.12.1-alpine
2022-01-24 11:20:57 -05:00
# set version label
2023-02-18 18:01:39 +01:00
ARG DOCKER_IMAGE_CREATED
2022-01-24 11:20:57 -05:00
ARG VERSION
2022-11-23 19:23:45 +01:00
LABEL build_version="pyload docker version:- ${VERSION} Build-date:- ${DOCKER_IMAGE_CREATED}"
2022-01-24 11:20:57 -05:00
2024-01-06 22:12:55 +01:00
# add local files
COPY *.patch root/ /
2022-01-24 11:20:57 -05:00
RUN \
2023-12-26 09:54:12 +01:00
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 && \
2022-01-24 11:20:57 -05:00
echo "**** install build packages ****" && \
apk add --no-cache --virtual=build-dependencies \
build-base \
curl-dev \
2024-01-06 22:12:55 +01:00
patch && \
2022-01-24 11:20:57 -05:00
echo "**** install packages ****" && \
apk add --no-cache \
2024-01-06 22:12:55 +01:00
tini su-exec shadow \
2022-01-24 11:20:57 -05:00
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-01-06 22:12:55 +01:00
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 / \
2022-01-24 11:20:57 -05:00
echo "**** cleanup ****" && \
apk del --purge \
build-dependencies && \
rm -rf \
2024-01-06 22:12:55 +01:00
/tmp/* \
/*.patch && \
echo "**** add user abc ****" && \
adduser -D -u 911 -h /config abc
2022-01-24 11:20:57 -05:00
# ports and volumes
EXPOSE 8000
VOLUME /config
2024-01-06 22:12:55 +01:00
ENTRYPOINT ["/sbin/tini", "--"]
CMD ["/start.sh"]