@tahminator/pipeline 1.0.92-beta.gba48c7d3 → 1.0.93

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/README.md CHANGED
@@ -333,6 +333,8 @@ The diff is split per Kubernetes object (matched by API group, kind, namespace a
333
333
 
334
334
  Interface with Docker to build & deploy images
335
335
 
336
+ `buildImage` runs BuildKit on the runner's network with `--network host`, so every `RUN` instruction can reach whatever the runner can, including hosts on the Headscale VPN connected by the setup action. Dockerfiles don't need `RUN --network=host`.
337
+
336
338
  ```ts
337
339
  // https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-2.html#using-declarations-and-explicit-resource-management
338
340
  await using client = await DockerClient.create(
@@ -48,7 +48,10 @@ export class DockerClient {
48
48
  console.log("Building image with following tags:");
49
49
  tags.forEach((tag) => console.log(Utils.Colors.cyan(tag)));
50
50
  try {
51
- await $ `docker buildx create --use --name ${dockerRepository}-builder`;
51
+ await $ `docker buildx create --use --name ${dockerRepository}-builder \
52
+ --driver docker-container \
53
+ --driver-opt network=host \
54
+ --buildkitd-flags ${"--allow-insecure-entitlement network.host"}`;
52
55
  }
53
56
  catch {
54
57
  await $ `docker buildx use ${dockerRepository}-builder`;
@@ -68,6 +71,8 @@ export class DockerClient {
68
71
  --cache-from=type=gha \
69
72
  --cache-to=type=gha,mode=max \
70
73
  ${buildArgFlags} \
74
+ --network host \
75
+ --allow network.host \
71
76
  ${tagFlags} \
72
77
  .`;
73
78
  console.log(shouldUpload ?
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "type": "module",
4
4
  "author": "Tahmid Ahmed",
5
5
  "description": "A collection of Bun shell scripts that can be re-used in various CICD pipelines.",
6
- "version": "1.0.92-beta.gba48c7d3",
6
+ "version": "1.0.93",
7
7
  "repository": {
8
8
  "url": "git+https://github.com/tahminator/pipeline.git"
9
9
  },