@vercel/container 24.0.0 → 24.0.1-snapshot-c4002eb2617b
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +17 -2
- package/dist/schedules-command-dispatcher +0 -0
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -400,15 +400,30 @@ function selectStorageDriver() {
|
|
|
400
400
|
}
|
|
401
401
|
return cachedStorageDriver;
|
|
402
402
|
}
|
|
403
|
-
var
|
|
403
|
+
var DOCKER_HUB_MIRROR_FLAG = "VERCEL_BUILDAH_DOCKER_HUB_MIRROR";
|
|
404
|
+
var SHORT_NAME_REGISTRIES_CONF = `unqualified-search-registries = ["docker.io"]
|
|
404
405
|
short-name-mode = "permissive"
|
|
405
406
|
`;
|
|
407
|
+
var DOCKER_HUB_MIRROR_REGISTRIES_CONF = `
|
|
408
|
+
[[registry]]
|
|
409
|
+
prefix = "docker.io"
|
|
410
|
+
location = "docker.io"
|
|
411
|
+
|
|
412
|
+
[[registry.mirror]]
|
|
413
|
+
location = "mirror.gcr.io"
|
|
414
|
+
`;
|
|
415
|
+
function buildahRegistriesConf() {
|
|
416
|
+
if (process.env[DOCKER_HUB_MIRROR_FLAG] === "0") {
|
|
417
|
+
return SHORT_NAME_REGISTRIES_CONF;
|
|
418
|
+
}
|
|
419
|
+
return SHORT_NAME_REGISTRIES_CONF + DOCKER_HUB_MIRROR_REGISTRIES_CONF;
|
|
420
|
+
}
|
|
406
421
|
var cachedRegistriesConfPath;
|
|
407
422
|
function buildahRegistriesConfPath() {
|
|
408
423
|
if (!cachedRegistriesConfPath) {
|
|
409
424
|
const dir = (0, import_node_fs2.mkdtempSync)((0, import_node_path4.join)((0, import_node_os4.tmpdir)(), "vercel-container-registries-"));
|
|
410
425
|
cachedRegistriesConfPath = (0, import_node_path4.join)(dir, "registries.conf");
|
|
411
|
-
(0, import_node_fs2.writeFileSync)(cachedRegistriesConfPath,
|
|
426
|
+
(0, import_node_fs2.writeFileSync)(cachedRegistriesConfPath, buildahRegistriesConf());
|
|
412
427
|
}
|
|
413
428
|
return cachedRegistriesConfPath;
|
|
414
429
|
}
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/container",
|
|
3
|
-
"version": "24.0.
|
|
3
|
+
"version": "24.0.1-snapshot-c4002eb2617b",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"homepage": "https://vercel.com/docs",
|
|
@@ -17,13 +17,13 @@
|
|
|
17
17
|
"tar": "7.5.11"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
|
-
"@vercel/build-utils": "15.2.
|
|
20
|
+
"@vercel/build-utils": "15.2.1-snapshot-c4002eb2617b"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@types/node": "20.11.0",
|
|
24
24
|
"vitest": "4.1.10",
|
|
25
25
|
"@vercel-internals/ipc-proxy": "1.1.1",
|
|
26
|
-
"@vercel/build-utils": "15.2.
|
|
26
|
+
"@vercel/build-utils": "15.2.1-snapshot-c4002eb2617b"
|
|
27
27
|
},
|
|
28
28
|
"publishConfig": {
|
|
29
29
|
"access": "public"
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"build": "node build.mjs",
|
|
33
33
|
"type-check": "tsc --noEmit",
|
|
34
34
|
"test": "vitest run --config ../../vitest.config.mts",
|
|
35
|
-
"test-unit": "node test-go.mjs && vitest run --config ../../vitest.config.mts test/unit.test.ts test/diagnostics.test.ts test/workspace.test.ts test/lifecycle-docker.test.ts test/ruby-version.test.ts test/go-version.test.ts test/rust-version.test.ts test/docker-push.test.ts test/cache.test.ts test/buildah-store-cache.test.ts test/buildah-store-command.test.ts test/buildah-debug.test.ts test/schedules-command.test.ts test/build-user.test.ts",
|
|
35
|
+
"test-unit": "node test-go.mjs && vitest run --config ../../vitest.config.mts test/unit.test.ts test/diagnostics.test.ts test/workspace.test.ts test/lifecycle-docker.test.ts test/ruby-version.test.ts test/go-version.test.ts test/rust-version.test.ts test/docker-push.test.ts test/cache.test.ts test/buildah-store-cache.test.ts test/buildah-store-command.test.ts test/buildah-debug.test.ts test/schedules-command.test.ts test/build-user.test.ts test/storage-driver.test.ts",
|
|
36
36
|
"test-e2e": "vitest run --config ../../vitest.config.mts test/e2e.test.ts"
|
|
37
37
|
}
|
|
38
38
|
}
|