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

Function getFolderImageName

src/spec-node/utils.ts:619–624  ·  view source on GitHub ↗
(params: ResolverParameters | DockerCLIParameters)

Source from the content-addressed store, hash-verified

617}
618
619export function getFolderImageName(params: ResolverParameters | DockerCLIParameters) {
620 const { cwd } = 'cwd' in params ? params : params.cliHost;
621 const folderHash = getFolderHash(cwd);
622 const baseName = path.basename(cwd);
623 return toDockerImageName(`vsc-${baseName}-${folderHash}`);
624}
625
626export function getFolderHash(fsPath: string): string {
627 return crypto.createHash('sha256').update(fsPath).digest('hex');

Callers 4

extendImageFunction · 0.90
getDefaultNameFunction · 0.90

Calls 2

toDockerImageNameFunction · 0.90
getFolderHashFunction · 0.85

Tested by

no test coverage detected