Repository navigation
Expand file tree
/
Copy pathDockerfile.service
More file actions
49 lines (39 loc) · 1.57 KB
/
Copy pathDockerfile.service
File metadata and controls
49 lines (39 loc) · 1.57 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
# Dockerfile.service — Runs a single Axon OS D-Bus service in a container.
# Build: docker build -t axon-service -f Dockerfile.service .
# Run: docker run -e AXON_SERVICE=brain axon-service
FROM python:3.12-slim
ENV DEBIAN_FRONTEND=noninteractive
ENV PYTHONUNBUFFERED=1
RUN apt-get update && apt-get install -y --no-install-recommends \
libglib2.0-dev \
libdbus-1-dev \
libcairo2-dev \
pkg-config \
gir1.2-gtk-4.0 \
gir1.2-adw-1 \
gir1.2-vte-3.91 \
&& rm -rf /var/lib/apt/lists/*
# Install Python bindings via pip so they match the container's Python 3.12
RUN pip install --no-cache-dir dbus-python PyGObject
WORKDIR /app
COPY services/ ./services/
COPY apps/ ./apps/
COPY axon_logger.py ./
COPY pyproject.toml ./
COPY requirements-docker.txt ./
RUN pip install --no-cache-dir -r requirements-docker.txt
ENV AXON_SERVICE=brain
RUN useradd --create-home --shell /bin/bash axon
USER axon
CMD ["sh", "-c", "\
case \"$AXON_SERVICE\" in \
brain) exec python3 services/axon-brain/brain_service.py ;; \
context) exec python3 services/axon-context/context_service.py ;; \
search) exec python3 services/axon-search/search_service.py ;; \
voice) exec python3 services/axon-voice/voice_service.py ;; \
gui-agent) exec python3 services/axon-gui-agent/gui_agent_service.py ;; \
sandbox) exec python3 services/axon-sandbox/sandbox_manager.py ;; \
global-search) exec python3 services/axon-search/global_search_service.py ;; \
*) echo \"Unknown service: $AXON_SERVICE\"; exit 1 ;; \
esac \
"]