From 1ec2a76d1e27a87584e61d91632f8b829148227d Mon Sep 17 00:00:00 2001 From: Chris Farhood Date: Sat, 4 Jul 2026 18:09:17 -0400 Subject: [PATCH] ci: lean Dockerfile (drop build-essential), split+timeout build steps, buildkit --- .gitea/workflows/build.yaml | 18 +++++++++++++++--- Dockerfile | 15 +++------------ 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index fd7ad1d..009c1b4 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -12,20 +12,32 @@ permissions: jobs: build: runs-on: ubuntu-latest + timeout-minutes: 20 env: IMAGE: git.farh.net/farhoodlabs/intervalsicu-mcp + DOCKER_BUILDKIT: "1" steps: - name: Checkout uses: actions/checkout@v4 - - name: Build and push image + - name: Environment + run: | + docker version || true + df -h / || true + + - name: Login to registry run: | - set -eu echo "${{ secrets.REGISTRY_TOKEN }}" | docker login git.farh.net -u cpfarhood --password-stdin - docker build \ + + - name: Build image + run: | + docker build --progress=plain \ -t "${IMAGE}:latest" \ -t "${IMAGE}:${GITHUB_SHA}" \ . + + - name: Push image + run: | docker push "${IMAGE}:latest" docker push "${IMAGE}:${GITHUB_SHA}" echo "pushed ${IMAGE}:latest and ${IMAGE}:${GITHUB_SHA}" diff --git a/Dockerfile b/Dockerfile index 4b6c64e..bc3a58c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,25 +1,16 @@ FROM python:3.12-slim -# Set working directory WORKDIR /app -# Install build dependencies and Python build backend -RUN apt-get update \ - && apt-get install -y --no-install-recommends \ - build-essential \ - curl \ - && rm -rf /var/lib/apt/lists/* - -# Install Python build tool -RUN pip install --no-cache-dir hatchling - # Copy project files COPY pyproject.toml pyproject.toml COPY src src COPY README.md README.md COPY .env.example .env.example -# Install the package and runtime dependencies +# Install the package and runtime dependencies. All dependencies ship as +# manylinux wheels (pydantic-core, cryptography, etc.), so no build toolchain +# is required — keeping the image small and the build fast. RUN pip install --no-cache-dir . # Run the MCP server. Transport is selected via MCP_TRANSPORT (default stdio);