0d9ead7556
Replace `RUN curl -LsSf https://astral.sh/uv/install.sh | sh` across all starter Dockerfiles with `COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /usr/local/bin/`. The curl|sh form has a pipe-swallow latent bug: when astral.sh returns a 5xx, curl fails but `sh` gets no stdin and exits 0, so the layer "succeeds" with no uv binary. A later `RUN uv sync` then crashes with `uv: not found` (exit 127). This already bit the agno starter today (run 24809910399) when astral.sh had a transient outage; upstream recovered on its own so this is latent-bug cleanup, not a hotfix. Using the official uv image is uv's own recommended pattern: it's cache-friendly, network-free at build time, and sidesteps the pipe failure mode entirely. Scope: all 20 Dockerfiles under examples/integrations/*/Dockerfile, examples/integrations/*/docker/Dockerfile.agent, and examples/showcases/scene-creator/agent/Dockerfile. Verified locally: `docker build -f docker/Dockerfile.agent ./agent` for agno succeeds against the new pattern.
19 lines
449 B
Docker
19 lines
449 B
Docker
FROM python:3.12-slim
|
|
|
|
# Install uv by copying from the official image (avoids curl|sh pipe-swallow bug
|
|
# where a 5xx on astral.sh silently produces an exit-0 layer with no uv binary).
|
|
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /usr/local/bin/
|
|
|
|
ENV PYTHONPATH=/app/src
|
|
|
|
WORKDIR /app
|
|
|
|
COPY pyproject.toml uv.lock ./
|
|
COPY src/ ./src/
|
|
|
|
RUN uv sync
|
|
|
|
EXPOSE 8000
|
|
|
|
CMD ["uv", "run", "uvicorn", "src.main:app", "--host", "0.0.0.0", "--port", "8000"]
|