forked from superplanehq/superplane
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
65 lines (45 loc) · 1.73 KB
/
Dockerfile
File metadata and controls
65 lines (45 loc) · 1.73 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
FROM python:3.13-slim AS base
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
COPY --from=ghcr.io/astral-sh/uv:0.6.6 /uv /uvx /bin/
WORKDIR /app/agent
RUN apt-get update \
&& apt-get install -y --no-install-recommends bash ca-certificates \
&& rm -rf /var/lib/apt/lists/*
FROM base AS dev
RUN apt-get update \
&& apt-get install -y --no-install-recommends make \
&& rm -rf /var/lib/apt/lists/*
CMD ["bash", "-lc", "sleep infinity"]
FROM base AS builder
COPY pyproject.toml pyproject.toml
COPY uv.lock uv.lock
COPY README.md README.md
COPY src src
COPY db db
COPY evals evals
RUN uv sync --frozen --no-dev
FROM python:3.13-slim AS runner
LABEL org.opencontainers.image.title="superplane-agent" \
org.opencontainers.image.description="SuperPlane agent service" \
org.opencontainers.image.vendor="SuperPlane" \
org.opencontainers.image.source="https://github.com/superplanehq/superplane" \
org.opencontainers.image.url="https://superplane.com" \
org.opencontainers.image.documentation="https://docs.superplane.com"
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PYTHONPATH=/app/agent/src \
PATH=/app/agent/.venv/bin:$PATH
RUN apt-get update \
&& apt-get install -y --no-install-recommends bash ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# We don't need Docker health checks, since these containers
# are intended to run in Kubernetes pods, which have probes.
HEALTHCHECK NONE
WORKDIR /app/agent
RUN chown nobody /app/agent
COPY --from=builder --chown=nobody:root /app/agent /app/agent
USER nobody
EXPOSE 8090
EXPOSE 50061
CMD ["bash", "-lc", "uvicorn ai.web:create_app --factory --host 0.0.0.0 --port ${APP_PORT:-8090} --timeout-graceful-shutdown ${UVICORN_GRACEFUL_SHUTDOWN_TIMEOUT:-310}"]