-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile.timeplus
More file actions
68 lines (56 loc) · 2.35 KB
/
Dockerfile.timeplus
File metadata and controls
68 lines (56 loc) · 2.35 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
# All-in-One Docker Image for PulseBot with Timeplus Enterprise
FROM timeplus/timeplus-enterprise:3.1.2-rc.2
# Suppress interactive prompts for all apt-get calls in this build
ENV DEBIAN_FRONTEND=noninteractive
# Switch to root to install dependencies
USER root
# Install Python 3.12 via deadsnakes PPA (agent-free key import for Docker builds)
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
gpg \
lsb-release \
ca-certificates \
&& mkdir -p /etc/apt/keyrings \
&& curl -fsSL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xF23C5A6CF475977595C89F51BA6932366A755776" \
| gpg --batch --no-tty --no-autostart --dearmor -o /etc/apt/keyrings/deadsnakes.gpg \
&& echo "deb [signed-by=/etc/apt/keyrings/deadsnakes.gpg] https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu $(lsb_release -cs) main" \
> /etc/apt/sources.list.d/deadsnakes.list \
&& curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
python3.12 \
python3.12-venv \
nodejs \
&& rm -rf /var/lib/apt/lists/*
# Create symlinks for python and pip
RUN ln -sf /usr/bin/python3.12 /usr/bin/python
RUN ln -sf /usr/bin/python3.12 /usr/bin/python3
# Install pip for Python 3.12
RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3.12
WORKDIR /app
# Install PulseBot from PyPI
ARG PULSEBOT_VERSION
RUN python3.12 -m pip install --no-cache-dir \
--extra-index-url https://d.timeplus.com/simple/ \
pulsebot==${PULSEBOT_VERSION}
# Copy config template and scripts
COPY docker/config.yaml ./config.yaml
COPY docker/start-all-in-one.sh /usr/local/bin/
COPY docker/entrypoint-timeplus.sh /usr/local/bin/
# Make scripts executable
RUN chmod +x /usr/local/bin/start-all-in-one.sh /usr/local/bin/entrypoint-timeplus.sh
# Set ownership and switch back to the base image's default user if one exists
RUN if getent passwd timeplus > /dev/null 2>&1; then \
chown -R timeplus:timeplus /app; \
elif getent passwd proton > /dev/null 2>&1; then \
chown -R proton:proton /app; \
fi
# Expose ports
# 8000: Timeplus Enterprise Web UI
# 8123: HTTP port (batch queries)
# 3218: Streaming port
# 8463: Native TCP
# 8001: PulseBot API Server
EXPOSE 8000 8123 3218 8463 8001
# Use our custom entrypoint
ENTRYPOINT ["/usr/local/bin/entrypoint-timeplus.sh"]