PrefectHQ / PrefectHQ/examples

Building background-tasks Dockerfile fails due to missing uv.lock file

Open
#29 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
31
Forks
4
PR merge metrics
No merged PRs in 30d

Description

Reproduce by following the Background Tasks guide:

cd apps/background-tasks
OPENAI_API_KEY=abc docker compose up --build --watch
 => ERROR [task builder 3/5] COPY pyproject.toml uv.lock ./                                                                                                                              0.0s
------
 > [api builder 3/5] COPY pyproject.toml uv.lock ./:
------
------
 > [prefect-server builder 3/5] COPY pyproject.toml uv.lock ./:
------
------
 > [task builder 3/5] COPY pyproject.toml uv.lock ./:
------
target api: failed to solve: failed to compute cache key: failed to calculate checksum of ref f64ca454-2980-4991-9b33-8456e078b1ef::yhq19l0ao5kf8ktzj24m7k1xk: "/uv.lock": not found

That's caused by uv.lock file not existing in the repository. It seems either uv.lock file has to be added, or it shouldn't be copied in the COPY step and referenced in the uv sync command (remove --locked flag).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in apps/background-tasks by following the Background Tasks guide and running the documented docker compose up --build --watch command. Inspect the Dockerfile COPY of pyproject.toml and uv.lock and the related uv sync invocation; done means the background-tasks images build successfully without the missing uv.lock error.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python
Domain
build-system, devops
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.