MCPcopy Create free account
hub / github.com/anus-dev/ANUS / parseImageName

Function parseImageName

packages/cli/src/utils/sandbox.ts:105–109  ·  view source on GitHub ↗
(image: string)

Source from the content-addressed store, hash-verified

103// docker does not allow container names to contain ':' or '/', so we
104// parse those out to shorten the name
105function parseImageName(image: string): string {
106 const [fullName, tag] = image.split(':');
107 const name = fullName.split('/').at(-1) ?? 'unknown-image';
108 return tag ? `${name}-${tag}` : name;
109}
110
111function ports(): string[] {
112 return (process.env['SANDBOX_PORTS'] ?? '')

Callers 1

start_sandboxFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected