From 6747b03957bf7e8ab7e52d63adc06009575fe4bc Mon Sep 17 00:00:00 2001 From: Cliff Hill Date: Fri, 31 Oct 2025 18:42:23 -0400 Subject: [PATCH] More CICD image fisex, part 2 Signed-off-by: Cliff Hill --- Dockerfile.cicd | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/Dockerfile.cicd b/Dockerfile.cicd index b64f3fe..a52a31c 100644 --- a/Dockerfile.cicd +++ b/Dockerfile.cicd @@ -37,14 +37,23 @@ ENV VIRTUAL_ENV=/workspace/backend/.venv # Create venv and leverage pre-installed common tools RUN echo "=== Setting up optimized Python environment ===" && \ + # Create project virtual environment uv venv $VIRTUAL_ENV && \ - # List pre-installed common tools from base image - uv pip list --python /opt/python-dev-tools/bin/python --format=freeze > /tmp/base-tools.txt && \ - echo "Pre-installed tools available:" && \ - head -10 /tmp/base-tools.txt && \ + # Check if base image optimization is available + echo "=== Base Image Optimization Status ===" && \ + if [ -f "/opt/python-dev-tools/bin/python" ]; then \ + echo "✓ Found pre-installed Python dev tools - leveraging cache" && \ + uv pip list --python /opt/python-dev-tools/bin/python --format=freeze > /tmp/base-tools.txt && \ + echo "Available pre-installed tools:" && \ + head -10 /tmp/base-tools.txt; \ + else \ + echo "⚠ Pre-installed Python dev tools not found - fresh installation" && \ + echo "Base image may need rebuild for optimal caching"; \ + fi && \ + # Install project dependencies (uv will handle tool requirements automatically) echo "Installing project-specific dependencies..." && \ uv sync --dev && \ - echo "✓ Backend environment ready with optimized dependencies" + echo "✓ Backend environment ready with dependencies" ENV PATH="$VIRTUAL_ENV/bin:$PATH"