devcontainers / devcontainers/cli
Add "no-lockfile" as an option to "devcontainer.json" config file
- 主要语言
- TypeScript
- 星标
- 3k
- 派生
- 457
- 平均合并
- 13 小时 17 分钟
- 30 天内合并 PR
- 6
描述
Add a `no-lockfile` option to `devcontainer.json` to disable the generation and validation of `.devcontainer-lock.json`.
For example:
```json
{
"name": "my-devcontainer",
"noLockfile": true
}
```
The CLI already supports:
```bash
devcontainer up --no-lockfile
devcontainer build --no-lockfile
```
However, there is currently no way to configure this behavior directly in `devcontainer.json`.
This is especially problematic when the Dev Container CLI is invoked indirectly by an editor or IDE. In that case, users do not necessarily control the CLI arguments and therefore cannot easily pass `--no-lockfile`.
In my workflow, I intentionally do not want a lockfile. When `.devcontainer-lock.json` is generated or changes, it can cause the environment to be considered out of date and trigger an unnecessary rebuild. Deleting the lockfile allows me to reconnect to the existing container without rebuilding it, but having to manually remove it is a poor workaround.
贡献指南
调研方向
首先跟踪现有的 --no-lockfile 选项是如何由 devcontainer up 和 build 命令处理的,然后继续了解 devcontainer.json 选项是如何解析的。完成标准是:间接调用 CLI 时,devcontainer.json 中的 noLockfile 会禁用 .devcontainer-lock.json 的生成和验证。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- typescript
- 领域
- cli
- Issue 类型
- 功能
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 活跃
- 描述清晰度
- 基本清楚
- 新手友好度
- 68/100