From 110227599963898ff73a1c253468d7edd600b8ca Mon Sep 17 00:00:00 2001 From: Thomas Rogers Date: Mon, 27 Jul 2026 06:38:58 -0600 Subject: [PATCH] =?UTF-8?q?fix(docker):=20install=20git=20=E2=80=94=20the?= =?UTF-8?q?=20image=20has=20been=20unbuildable=20since=20June?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit pip shells out to git to install git+https dependencies. risk-engine's pyproject and requirements.txt both pull trading-py-commons that way, as does decision-engine's own requirements.txt, but python:3.12-slim ships no git binary, so the build dies at: ERROR: Cannot find command 'git' - do you have 'git' installed Timeline: the last successful image build was 2026-04-17; risk-engine adopted trading-py-commons on 2026-06-03. No push to main has happened since, so CI never re-ran and the break went unnoticed for ~8 weeks. The Pi is therefore running an April image, and any redeploy would have failed at the worst possible moment. Found while building the service for an e2e-replay run. Verified by building unmodified main (fails) and main+git (succeeds). Co-Authored-By: Claude Opus 5 (1M context) --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index 8f296df..aa4f3cc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,9 +4,12 @@ FROM python:3.12-slim WORKDIR /app # Install system dependencies (libpq for psycopg2) +# git is required at build time: both risk-engine and requirements.txt install +# shared libraries from git+https URLs, and pip shells out to git to do it. RUN apt-get update && apt-get install -y --no-install-recommends \ build-essential \ libpq-dev \ + git \ && rm -rf /var/lib/apt/lists/* # Create non-root user