feat: make inner container name configurable via CODER_CVM_CONTAINER_NAME
- Dominant language
- Go
- Stars
- 73
- Forks
- 22
- Avg merge
- 14h 50m
- Merged PRs (30d)
- 1
Description
## Summary
The inner container name is currently hardcoded to `workspace_cvm` and cannot be changed. There is already an environment variable constant `CODER_CVM_CONTAINER_NAME` defined in the code, but it is never used to override the container name.
## Current Behavior
The container name is hardcoded:
```go
InnerContainerName = "workspace_cvm"
```
And used directly when creating the container:
```go
containerID, err := dockerutil.CreateContainer(ctx, client, &dockerutil.ContainerConfig{
// ...
Name: InnerContainerName,
// ...
})
```
## Proposed Solution
Leverage the existing `CODER_CVM_CONTAINER_NAME` environment variable to allow users to configure the inner container name. If not set, default to the current `workspace_cvm`.
## Use Case
Users may want to customize the container name for organizational purposes, logging clarity, or to avoid conflicts in environments where multiple envbox instances are running.
---
_Issue created on behalf of a customer request._
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.