Skip to content

fix: add missing WORKDIR /app in production stage#57

Merged
bcherry merged 1 commit intolivekit-examples:mainfrom
ShayneP:fix/missing-workdir-production-stage
Mar 16, 2026
Merged

fix: add missing WORKDIR /app in production stage#57
bcherry merged 1 commit intolivekit-examples:mainfrom
ShayneP:fix/missing-workdir-production-stage

Conversation

@ShayneP
Copy link
Contributor

@ShayneP ShayneP commented Mar 16, 2026

The multi-stage build conversion in #56 inadvertently left WORKDIR /app only in the build stage. Each FROM resets the working directory, so the production stage defaults to /. This causes CMD ["uv", "run", "src/agent.py", "start"] to look for /src/agent.py instead of /app/src/agent.py, failing with:

error: Failed to spawn: `src/agent.py`
  Caused by: No such file or directory (os error 2)

Adds WORKDIR /app to the production stage, matching the CLI's embedded template (livekit-cli PR #789).

The multi-stage build conversion in livekit-examples#56 moved WORKDIR /app into the
build stage, but each FROM resets the working directory. Without
WORKDIR in the production stage, CMD runs from / and fails with
"Failed to spawn: src/agent.py - No such file or directory".

This matches the CLI's embedded template (livekit-cli PR #789).
@ShayneP ShayneP requested a review from bcherry March 16, 2026 14:49
@bcherry bcherry merged commit 95bedcd into livekit-examples:main Mar 16, 2026
2 of 3 checks passed
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.

2 participants