Skip to content

fix(docker): copy uv build inputs for podman compatibility#878

Open
chris-cald wants to merge 1 commit into
plastic-labs:mainfrom
chris-cald:fix/podman-uv-build-inputs
Open

fix(docker): copy uv build inputs for podman compatibility#878
chris-cald wants to merge 1 commit into
plastic-labs:mainfrom
chris-cald:fix/podman-uv-build-inputs

Conversation

@chris-cald

@chris-cald chris-cald commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

This pull request fixes #877 issue

Description

This PR updates the Dockerfile dependency-install layer to copy uv.lock and pyproject.toml before running uv sync, instead of reading them through BuildKit bind mounts.

The previous bind-mount form can fail under Podman on macOS with:

error: failed to open file `/app/pyproject.toml`: Permission denied (os error 13)

pyproject.toml and uv.lock are intrinsic build inputs for the Honcho image. Copying them into the dependency layer keeps dependency caching isolated from application source changes while avoiding Podman/macOS bind-mount permission issues.

No new runtime dependencies are introduced.


Additional context

Validated locally with Podman 5.8.3 on macOS:

podman compose up -d --build
curl http://localhost:8000/openapi.json

The API started successfully at http://localhost:8000 after this change.

Changelog

Added

Changed

  • Use COPY uv.lock pyproject.toml /app/ before the dependency install step instead of BuildKit bind mounts.

Deprecated

Removed

  • Removed BuildKit bind mounts for uv.lock and pyproject.toml from the dependency install step.

Fixed

  • Fixed Podman/macOS image builds failing to read pyproject.toml from a build-time bind mount.

Security

Summary by CodeRabbit

  • Chores
    • Updated the build setup to use a simpler dependency caching approach, which can improve build consistency and efficiency.
    • Kept dependency installation behavior the same while streamlining how build inputs are prepared.

Copilot AI review requested due to automatic review settings July 6, 2026 19:31

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request updates the container build to improve Podman/macOS compatibility by removing BuildKit bind mounts for pyproject.toml and uv.lock during dependency installation and instead copying these files into the image layer before running uv sync. This keeps the dependency layer cache-friendly (changes to application source won’t invalidate it) while avoiding Podman bind-mount permission failures.

Changes:

  • Copy uv.lock and pyproject.toml into /app/ prior to dependency installation.
  • Remove BuildKit --mount=type=bind usage for those two files in the dependency install step.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 51593be9-3448-45ca-98ae-365e8c062743

📥 Commits

Reviewing files that changed from the base of the PR and between 602347d and 1c6285d.

📒 Files selected for processing (1)
  • Dockerfile

Walkthrough

The Dockerfile's dependency-install layer is reordered so that uv.lock and pyproject.toml are copied into /app/ before running uv sync, replacing the prior bind-mount-based approach with a cache-only mount for /root/.cache/uv.

Changes

Dockerfile dependency caching fix

Layer / File(s) Summary
Copy-before-sync dependency layer
Dockerfile
uv.lock/pyproject.toml are now copied into /app/ before uv sync --frozen --no-install-project --no-group dev runs, using only a cache mount instead of bind mounts for these files.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Estimated code review effort: 1 (Trivial) | ~3 minutes

Poem

A hop, a skip, a tiny fix,
Bind mounts gone, no more permission tricks 🐇
Copy first, then sync with care,
Podman builds now free from despair,
Carrots and containers, a perfect pair!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and accurately describes the Dockerfile change for Podman compatibility.
Linked Issues check ✅ Passed The Dockerfile now copies uv inputs before sync, which matches issue #877's fix for Podman/macOS bind-mount failures.
Out of Scope Changes check ✅ Passed The only change is the dependency-install layer adjustment needed to resolve the linked Podman build issue.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

[Bug] Podman build fails on uv dependency bind mounts

2 participants