Skip to content

Commit bb211a1

Browse files
committed
[nixpacks] use global DOCKER_VERSION const
1 parent 9146ad2 commit bb211a1

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

nixpacks/src/dagger/jobs.ts

+5-3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ export enum Job {
1616

1717
export const exclude = [];
1818

19+
const DOCKER_VERSION = "25.0.3";
20+
1921
/**
2022
* Build an OCI image from your project using nixpacks
2123
*
@@ -46,7 +48,7 @@ export async function build(
4648
.withExec(["docker", "buildx", "version"])
4749
.withDirectory("/app", context)
4850
.withWorkdir("/app")
49-
.withServiceBinding("dockerd", docker("25.0.3", true))
51+
.withServiceBinding("dockerd", docker(DOCKER_VERSION, true))
5052
.withEnvVariable("DOCKER_HOST", "tcp://dockerd:2375")
5153
.withExec(["nixpacks", "build", path, "--name", name]);
5254
return ctr.stdout();
@@ -113,7 +115,7 @@ export async function dev(
113115
.withExec(["docker", "buildx", "version"])
114116
.withDirectory("/app", context)
115117
.withWorkdir("/app")
116-
.withServiceBinding("dockerd", docker("25.0.3", true))
118+
.withServiceBinding("dockerd", docker(DOCKER_VERSION, true))
117119
.withEnvVariable("DOCKER_HOST", "tcp://dockerd:2375")
118120
.withDefaultTerminalCmd(["bash", "-i"]);
119121

@@ -148,7 +150,7 @@ export async function publish(
148150
.withMountedCache("/root/.pkgx", dag.cacheVolume("pkgx-cache"))
149151
.withExec(["pkgx", "install", "docker"])
150152
.withExec(["docker", "-v"])
151-
.withServiceBinding("dockerd", docker("25.0.3", true))
153+
.withServiceBinding("dockerd", docker(DOCKER_VERSION, true))
152154
.withEnvVariable("DOCKER_HOST", "tcp://dockerd:2375")
153155
.withSecretVariable("REGISTRY_PASSWORD", secret!)
154156
.withExec([

0 commit comments

Comments
 (0)