When using lk agent deploy, can I pass a renamed D...
# ask-ai
t
When using lk agent deploy, can I pass a renamed Dockerfile? Or the dockerfile must always have that name and be in the root project dir?
t
Thanks for reaching out, Tom. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — quick answer: the Dockerfile must be named
Dockerfile
and live in the project root.
lk agent deploy
looks for
Dockerfile
in the current directory and does not support passing a renamed file or custom path. If you want, tell me your project layout and I can suggest how to move or generate the Dockerfile so deployment works. Sources: Deploying to production | LiveKit Docs | livekit/livekit_composite | DeepWiki
t
i have multiple dockerfiles for eg my fastapi deployment from my monorepo. Would it be more typical to put the livekit Dockerfile in some sub directory?
t
Thanks — good question. You're right that monorepos commonly have one Dockerfile per service. Because
lk agent deploy
requires a file named
Dockerfile
in the directory you run it from, the typical approaches are: • Keep the LiveKit service in its own subdirectory with its
Dockerfile
, then run
cd path/to/livekit-service && lk agent deploy
. • Keep Dockerfiles next to each service and script the deploy step (CI job or local script) to
cd
into the correct service folder before running the CLI. • If you prefer running from repo root, copy or symlink the service's Dockerfile to the root as
Dockerfile
before deploy (or have your build script do this). Which setup are you using (separate service folders, CI pipelines, or running from root)? I can suggest a concrete script or CI example for your workflow.