-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile.pyinstallerbuild
31 lines (31 loc) · 1.49 KB
/
Dockerfile.pyinstallerbuild
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
FROM python:3.11-bookworm
RUN apt-get update && apt-get install -y --no-install-recommends tzdata git gcc build-essential libc-dev libjpeg-dev libffi-dev libxml2-dev libxslt-dev zlib1g-dev libyaml-dev && \
apt-get install -y linux-headers-generic || apt-get install -y linux-headers-amd64 || apt-get install -y linux-headers-arm64 || apt-get install -y linux-headers-armhf \
&& cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& echo "Asia/Shanghai" > /etc/timezone && \
git clone --depth=1 https://github.com/txperl/PixivBiu.git && \
cd /PixivBiu && \
mkdir ./.pkg/code && \
mkdir ./.pkg/public && \
cp -r ./altfe/ ./.pkg/code/altfe/ && \
cp -r ./app/ ./.pkg/code/app/ && \
cp ./main.py ./.pkg/code/ && \
cp -r ./usr/ ./.pkg/public/usr/ && \
cp ./app/config/biu_default.yml ./.pkg/public/config.yml && \
cp ./LICENSE ./.pkg/public/ && \
cp ./README.md ./.pkg/public/ && \
pip install -r requirements.txt --no-cache-dir && \
pip install pyinstaller --no-cache-dir && \
python3 /PixivBiu/.pkg/py-pkger.py auto && \
cd / && \
mkdir -p /Pixiv && \
cp -r /PixivBiu/.pkg/dist/* /Pixiv/ && \
rm -rf /PixivBiu /Pixiv/config.yml /Pixiv/LICENSE /Pixiv/README.md && \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false tzdata git && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /tmp/*
EXPOSE 4001
ENV sys.host="0.0.0.0:4001"
ENV sys.autoOpen=false
ENV sys.ignoreOutdated=true
ENTRYPOINT ["/Pixiv/main"]