chore(docker): optimise build performance and pin image versions#41
Open
jmiguelv wants to merge 1 commit into
Open
chore(docker): optimise build performance and pin image versions#41jmiguelv wants to merge 1 commit into
jmiguelv wants to merge 1 commit into
Conversation
- Add .dockerignore to backend and harvester to reduce build context from ~1.1 GB to <1 MB by excluding .venv, __pycache__, tests, data - Convert backend and harvester to multi-stage Dockerfiles; uv is used only in the builder stage and the venv is copied to a clean runtime - Add BuildKit cache mounts for uv to persist the package cache across rebuilds, making dependency-unchanged builds significantly faster - Pin all external image tags (qdrant, redis, redis-insight, phoenix) to avoid unnecessary registry re-pulls on every compose invocation - Update README docker compose run examples to drop the uv run prefix Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.dockerignorefiles added tobackend/andharvester/— reduces build context from ~1.1 GB to <1 MB by excluding.venv,__pycache__,tests/,data/--mount=type=cache,target=/root/.cache/uv) — source-only rebuilds skip package re-downloads entirelydocker-compose.yml—qdrant:v1.18.0,redis:7-alpine,redisinsight:3.4.2,phoenix:15.6.0uv runprefix from alldocker compose runexamplesTest plan
docker compose build --no-cachesucceeds for backend and harvesterdocker compose build backend— only theCOPY . .layer re-executes (seconds, not minutes)docker compose up -d— all services healthy, backend reachable at http://localhost:8000docker compose run --rm harvester python main.py --allruns without errors🤖 Generated with Claude Code