Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractAndInitializeDevcontainerScripts ¶ added in v2.21.0
func ExtractAndInitializeDevcontainerScripts( logger slog.Logger, expandPath func(string) (string, error), devcontainers []codersdk.WorkspaceAgentDevcontainer, scripts []codersdk.WorkspaceAgentScript, ) (filteredScripts []codersdk.WorkspaceAgentScript, devcontainerScripts []codersdk.WorkspaceAgentScript)
ExtractAndInitializeDevcontainerScripts extracts devcontainer scripts from the given scripts and devcontainers. The devcontainer scripts are removed from the returned scripts so that they can be run separately.
Dev Containers have an inherent dependency on start scripts, since they initialize the workspace (e.g. git clone, npm install, etc). This is important if e.g. a Coder module to install @devcontainer/cli is used.
Types ¶
type DockerCLILister ¶
type DockerCLILister struct {
// contains filtered or unexported fields
}
DockerCLILister is a ContainerLister that lists containers using the docker CLI
func (*DockerCLILister) List ¶
func (dcl *DockerCLILister) List(ctx context.Context) (codersdk.WorkspaceAgentListContainersResponse, error)
type DockerEnvInfoer ¶
type DockerEnvInfoer struct { usershell.SystemEnvInfo // contains filtered or unexported fields }
DockerEnvInfoer is an implementation of agentssh.EnvInfoer that returns information about a container.
func EnvInfo ¶
func EnvInfo(ctx context.Context, execer agentexec.Execer, container, containerUser string) (*DockerEnvInfoer, error)
EnvInfo returns information about the environment of a container.
func (*DockerEnvInfoer) ModifyCommand ¶
func (dei *DockerEnvInfoer) ModifyCommand(cmd string, args ...string) (string, []string)
type Lister ¶
type Lister interface { // List returns a list of containers visible to the workspace agent. // This should include running and stopped containers. List(ctx context.Context) (codersdk.WorkspaceAgentListContainersResponse, error) }
Lister is an interface for listing containers visible to the workspace agent.
type NoopLister ¶
type NoopLister struct{}
NoopLister is a Lister interface that never returns any containers.
func (NoopLister) List ¶
func (NoopLister) List(_ context.Context) (codersdk.WorkspaceAgentListContainersResponse, error)