-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathdockerfile
More file actions
73 lines (63 loc) · 1.94 KB
/
dockerfile
File metadata and controls
73 lines (63 loc) · 1.94 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
FROM python:3.11-slim AS builder
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
curl \
ca-certificates \
git \
build-essential \
pkg-config \
libcairo2-dev \
libjpeg-dev \
libffi-dev \
python3-dev \
cmake \
meson; \
curl -fsSL https://deb.nodesource.com/setup_18.x | bash -; \
apt-get install -y --no-install-recommends nodejs; \
rm -rf /var/lib/apt/lists/*
COPY requirements.txt /build/requirements.txt
RUN pip config set global.index-url https://pypi.org/simple/ && \
pip install --upgrade pip && \
pip install --no-cache-dir --prefix=/install \
-r /build/requirements.txt \
PyJWT \
brotli \
qrcode \
qrcode_terminal \
flask_sock \
pytz \
qzone_api \
cloudscraper \
fuzzywuzzy \
imageio \
python-dateutil
FROM python:3.11-slim
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
curl \
ca-certificates \
ffmpeg \
libjpeg-dev \
zlib1g-dev \
libpq-dev \
libcairo2 \
tzdata \
libzbar0; \
curl -fsSL https://deb.nodesource.com/setup_18.x | bash -; \
apt-get install -y --no-install-recommends nodejs; \
ln -fs /usr/share/zoneinfo/Asia/Shanghai /etc/localtime; \
dpkg-reconfigure --frontend noninteractive tzdata; \
apt-get clean; \
rm -rf /var/lib/apt/lists/*; \
npm cache clean --force
COPY --from=builder /install /usr/local
COPY . /app/Eridanus
RUN sed -i 's|ws://127.0.0.1:3001|ws://napcat:3001|g' /app/Eridanus/run/common_config/basic_config.yaml && \
sed -i 's|redis_ip: default|redis_ip: "redis"|g' /app/Eridanus/run/common_config/basic_config.yaml
WORKDIR /app
ENV PYTHONPATH=/usr/local/lib/python3.11/site-packages
ENV TZ=Asia/Shanghai
EXPOSE 5007
CMD ["python", "Eridanus/main.py"]