Pre-load Devbox environment in container entrypoints for LLM agents and CI/CD
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 25/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- go
- 领域
- cli, devtools, infrastructure
调研方向
The issue does not identify implementation files or tests. Start by reading the existing devbox shell, devbox run, and container entrypoint code to understand how the environment is constructed and applied. The requested alternatives span CLI behavior, container startup, and environment export; done means a chosen approach reliably makes the Devbox environment available to non-interactive processes.
由索引模型根据 Issue 内容生成。
描述
What problem are you trying to solve?
I want to run automated scripts or agents inside a Devbox-managed container where dependencies installed via devbox.json are immediately available in PATH—without requiring an interactive devbox shell session.
Currently, when launching a container (e.g., via devbox run or Docker), the environment variables and PATH modifications from Devbox are not applied unless the process runs inside an interactive Devbox shell. This breaks headless/automated workflows like CI jobs, LLM agents, or background services that need project-specific tools (e.g., go, python, node, custom binaries) available at startup.
Specifically, I'm building agentbox, where an LLM agent runs inside a container and needs immediate access to the project's toolchain to execute, test, or debug code. Having to manually enter devbox shell first defeats the purpose of an autonomous, reproducible environment.
What solution would you like?
Add support for non-interactive environment activation in Devbox containers. Specifically:
devbox shell -c "<command>"(similar to bash -c) or similar flag that executes a command with the full Devbox environment (PATH, env vars, etc.). This is differs from commands from "devbox run" because thery are not defined in the devbox.json file.- Container entrypoint option: Allow specifying a command in devbox.json or via CLI that runs automatically with the environment pre-loaded when the container starts (e.g., devbox container run --entrypoint "my-agent").
- Exportable environment script: Generate a shell script (e.g., devbox export-env) that can be sourced in a Dockerfile or entrypoint to initialize the environment for any subsequent command.
This would enable headless automation while preserving Devbox's reproducible dependency management—no need to bake custom images or manually manage PATH.
Alternatives you've considered
- Manual eval "$(devbox shellenv)" in entrypoint: This works in some cases but adds complexity, requires bash/shell, and isn't officially documented for container use. It also doesn't handle all edge cases (e.g., non-shell processes).
- Custom Docker images per project: Defeats the purpose of Devbox's dynamic environment management and increases build/maintenance overhead.
- Wrapper scripts that invoke a command inside something like
devox run -- bashordevbox shell -c "command": Limited by the fact that devbox shell is designed for interactive use; non-interactive usage is unreliable or unsupported.
- 主要语言
- Go
- 星标
- 12.4k
- 派生
- 358
- 平均合并
- 17 小时 12 分钟
- 30 天内合并 PR
- 31
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
jetify-com/devbox 的其他 Issue
-
feature triage
难度 2/5 1-3 小时 新手友好度 62/100
jetify-com/devbox#3038 ·
维护者通常 1 天内回复
-
bug p4 package processed triage unrelated
难度 2/5 1-3 小时 新手友好度 66/100
jetify-com/devbox#2898 · 2 条评论 ·
维护者通常 1 天内回复
-
p4 processed unrelated
难度 2/5 1-3 小时 新手友好度 65/100
jetify-com/devbox#2750 · 1 条评论 ·
维护者通常 1 天内回复
-
Storyden未关闭p4 package processed triage unrelated
难度 2/5 1-3 小时 新手友好度 62/100
jetify-com/devbox#2685 · 1 条评论 ·
维护者通常 1 天内回复
-
looks easy p4 package processed triage
难度 2/5 1-3 小时 新手友好度 60/100
jetify-com/devbox#2656 · 1 条评论 ·
维护者通常 1 天内回复
查看 jetify-com/devbox 的全部 Issue
相似的 Issue
-
area:sampler tech-debt
难度 2/5 1-3 小时 新手友好度 72/100
jmbarzee/temporal-architect#302 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
riverqueue/river#1576 ·
维护者通常 1 天内回复
-
NFS StorageProvider renders a missing nfsSubDir as "<no value>"可能已有人在做 @ldming 今天认领。 未关闭kind/bug
难度 2/5 1-3 小时 新手友好度 82/100
apecloud/kubeblocks#11067 ·
维护者通常 1 天内回复
-
area:ui bug priority:low
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
RTX payload type is not found when the RTX fmtp line has rtx-time可能已有人在做 @RaphaelFakhri 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复