Add a no-lockfile option to devcontainer.json to disable the generation and validation of .devcontainer-lock.json.
For example:
{
"name": "my-devcontainer",
"noLockfile": true
}
The CLI already supports:
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.
Add a
no-lockfileoption todevcontainer.jsonto disable the generation and validation of.devcontainer-lock.json.For example:
{ "name": "my-devcontainer", "noLockfile": true }The CLI already supports:
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.jsonis 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.