Skip to content

fix: Dockerfile build fails because uv sync runs before source is copied#8

Merged
mjbommar merged 1 commit intoalea-institute:mainfrom
stenoagency:fix/dockerfile-build
Mar 22, 2026
Merged

fix: Dockerfile build fails because uv sync runs before source is copied#8
mjbommar merged 1 commit intoalea-institute:mainfrom
stenoagency:fix/dockerfile-build

Conversation

@jpdsteno
Copy link
Copy Markdown
Contributor

Summary

  • Fixes Dockerfile build failure where uv venv after uv sync tries to recreate an already-existing virtual environment
  • Removes unnecessary bash -l -c wrapper and uv run python no-op
  • Splits dependency install into two stages (--no-install-project before code copy, full sync after) for proper Docker layer caching

Closes #6

Test plan

  • docker build -f docker/Dockerfile -t folio-api:test . succeeds
  • Step 14 installs 89 dependency packages (caching layer)
  • Step 17 installs only folio-api==0.4.0 after source copy

uv sync tries to install the project package (folio-api) which requires
the folio_api/ source directory, but it isn't COPY'd until the next step.
Additionally, uv venv after uv sync overwrites the venv just created.

Split into two steps: --no-install-project for the dependency caching
layer, then a second uv sync after the source is copied.
@mjbommar mjbommar merged commit c04b7c4 into alea-institute:main Mar 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dockerfile build fails: uv sync cannot install project before source is copied

2 participants