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

Function supportsBuildContexts

src/spec-node/dockerfileUtils.ts:263–273  ·  view source on GitHub ↗
(dockerfile: Dockerfile)

Source from the content-addressed store, hash-verified

261}
262
263export function supportsBuildContexts(dockerfile: Dockerfile) {
264 const version = dockerfile.preamble.version;
265 if (!version) {
266 return dockerfile.preamble.directives.syntax ? 'unknown' : false;
267 }
268 const numVersion = (/^\d+(\.\d+){0,2}/.exec(version) || [])[0];
269 if (!numVersion) {
270 return true; // latest, labs or no tag.
271 }
272 return semver.intersects(numVersion, '>=1.4');
273}
274
275/**
276 * Convert mount command' arguments to string

Callers 2

getFeaturesBuildOptionsFunction · 0.90

Calls 1

execMethod · 0.65

Tested by

no test coverage detected