MCPcopy Index your code
hub / github.com/devcontainers/cli / launch

Function launch

src/spec-node/devContainers.ts:79–103  ·  view source on GitHub ↗
(options: ProvisionOptions, providedIdLabels: string[] | undefined, disposables: (() => Promise<unknown> | undefined)[])

Source from the content-addressed store, hash-verified

77}
78
79export async function launch(options: ProvisionOptions, providedIdLabels: string[] | undefined, disposables: (() => Promise<unknown> | undefined)[]) {
80 const params = await createDockerParams(options, disposables);
81 const output = params.common.output;
82 const text = 'Resolving Remote';
83 const start = output.start(text);
84
85 const result = await resolve(params, options.configFile, options.overrideConfigFile, providedIdLabels, options.additionalFeatures ?? {});
86 output.stop(text, start);
87 const { dockerContainerId, composeProjectName } = result;
88 return {
89 containerId: dockerContainerId,
90 composeProjectName,
91 remoteUser: result.properties.user,
92 remoteWorkspaceFolder: result.properties.remoteWorkspaceFolder,
93 configuration: options.includeConfig ? result.config : undefined,
94 mergedConfiguration: options.includeMergedConfig ? result.mergedConfig : undefined,
95 finishBackgroundTasks: async () => {
96 try {
97 await finishBackgroundTasks(result.params.backgroundTasks);
98 } catch (err) {
99 output.write(toErrorText(String(err && (err.stack || err.message) || err)));
100 }
101 },
102 };
103}
104
105export async function createDockerParams(options: ProvisionOptions, disposables: (() => Promise<unknown> | undefined)[]): Promise<DockerResolverParameters> {
106 const { persistedFolder, additionalMounts, updateRemoteUserUIDDefault, containerDataFolder, containerSystemDataFolder, workspaceMountConsistency, gpuAvailability, mountWorkspaceGitRoot, mountGitWorktreeCommonDir, remoteEnv, noLockfile, frozenLockfile, omitLoggerHeader, secretsP } = options;

Callers 2

doProvisionFunction · 0.90
launchProjectFunction · 0.90

Calls 7

resolveFunction · 0.90
finishBackgroundTasksFunction · 0.90
toErrorTextFunction · 0.90
createDockerParamsFunction · 0.85
startMethod · 0.80
stopMethod · 0.80
writeMethod · 0.65

Tested by

no test coverage detected