Skip to content

feat: make inner container name configurable via CODER_CVM_CONTAINER_NAME #159

@blinkagent

Description

@blinkagent

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions