2024-08-13 07:07:21 +02:00
|
|
|
FROM python:3.12.5-alpine
|
2022-01-24 17:20:57 +01:00
|
|
|
# set version label
|
|
|
|
ARG VERSION
|
|
|
|
|
2024-01-06 22:12:55 +01:00
|
|
|
# add local files
|
2024-04-30 20:53:02 +02:00
|
|
|
COPY root/ /
|
2022-01-24 17:20:57 +01:00
|
|
|
|
|
|
|
RUN \
|
2024-08-13 06:17:38 +02:00
|
|
|
wget -q https://nexus.nyyu.dev/repository/files/alpine/7zip-24.08-r0.apk && \
|
2023-12-26 09:54:12 +01:00
|
|
|
apk add --no-cache --allow-untrusted 7zip*.apk && \
|
|
|
|
rm -f 7zip*.apk && \
|
2022-01-24 17:20:57 +01:00
|
|
|
echo "**** install packages ****" && \
|
2024-08-13 07:07:21 +02:00
|
|
|
apk add --no-cache --virtual=build-dependencies \
|
|
|
|
gcc musl-dev \
|
|
|
|
curl-dev && \
|
2022-01-24 17:20:57 +01:00
|
|
|
apk add --no-cache \
|
2024-04-30 20:53:02 +02:00
|
|
|
shadow \
|
2022-01-24 17:20:57 +01: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}" && \
|
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 17:20:57 +01:00
|
|
|
|
|
|
|
# ports and volumes
|
|
|
|
EXPOSE 8000
|
|
|
|
VOLUME /config
|
2024-01-06 22:12:55 +01:00
|
|
|
|
|
|
|
CMD ["/start.sh"]
|