-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (21 loc) · 993 Bytes
/
Dockerfile
File metadata and controls
31 lines (21 loc) · 993 Bytes
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.14-slim
RUN apt-get update \
&& apt-get install -y --no-install-recommends build-essential gcc g++ make pkg-config ca-certificates git curl libssl-dev libffi-dev libbz2-dev libreadline-dev libsqlite3-dev zlib1g-dev liblzma-dev libncurses5-dev libncursesw5-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY . .
RUN pip install --no-cache-dir -r requirements.txt
RUN git clone https://github.com/PEERS21/Common-python.git /app/common
RUN pip install --no-cache-dir -r common/requirements.txt \
&& pip uninstall -y redis || true \
&& pip install --no-cache-dir "redis==7.2.0"
RUN apt-get remove -y --purge gcc g++ make pkg-config git curl \
&& apt-get autoremove -y
RUN python - <<'PY'
import importlib, sys
r = importlib.import_module('redis')
print('redis ok:', r.__version__, r.__file__)
import redis.exceptions as exc
print('DataError present:', hasattr(exc, 'DataError'), 'exceptions file:', getattr(exc, "__file__", None))
PY
CMD ["python", "bot.py"]