-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (21 loc) · 773 Bytes
/
Dockerfile
File metadata and controls
31 lines (21 loc) · 773 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
# Single image for both A2A servers; set A2A_ROLE at runtime (Kubernetes env or docker run -e).
FROM python:3.12-slim
WORKDIR /app
RUN groupadd -r appuser && useradd -r -u 1001 -g 0 -m -d /home/appuser appuser
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv
COPY pyproject.toml .
COPY src ./src
RUN uv pip install --system --no-cache .
COPY entrypoint.sh /app/entrypoint.sh
RUN chmod +x /app/entrypoint.sh
# CrewAI runtime paths (OpenShift arbitrary UID / GID 0)
RUN mkdir -p /home/appuser/.local/share/app \
&& chown -R appuser:0 /app /home/appuser \
&& chmod -R g=u /app /home/appuser \
&& chmod g+x /app/entrypoint.sh
ENV HOME=/home/appuser
ENV PYTHONPATH=/app
ENV PORT=8080
USER appuser
EXPOSE 8080
ENTRYPOINT ["/app/entrypoint.sh"]