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:
InnerContainerName = "workspace_cvm"
And used directly when creating the container:
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.