@@ -17,6 +17,7 @@ export enum Job {
17
17
export const exclude = [ ] ;
18
18
19
19
const DOCKER_VERSION = "25.0.3" ;
20
+ const DOCKER_HOST = "tcp://dockerd:2375" ;
20
21
21
22
/**
22
23
* Build an OCI image from your project using nixpacks
@@ -49,7 +50,7 @@ export async function build(
49
50
. withDirectory ( "/app" , context )
50
51
. withWorkdir ( "/app" )
51
52
. withServiceBinding ( "dockerd" , docker ( DOCKER_VERSION , true ) )
52
- . withEnvVariable ( "DOCKER_HOST" , "tcp://dockerd:2375" )
53
+ . withEnvVariable ( "DOCKER_HOST" , DOCKER_HOST )
53
54
. withExec ( [ "nixpacks" , "build" , path , "--name" , name ] ) ;
54
55
return ctr . stdout ( ) ;
55
56
}
@@ -116,7 +117,7 @@ export async function dev(
116
117
. withDirectory ( "/app" , context )
117
118
. withWorkdir ( "/app" )
118
119
. withServiceBinding ( "dockerd" , docker ( DOCKER_VERSION , true ) )
119
- . withEnvVariable ( "DOCKER_HOST" , "tcp://dockerd:2375" )
120
+ . withEnvVariable ( "DOCKER_HOST" , DOCKER_HOST )
120
121
. withDefaultTerminalCmd ( [ "bash" , "-i" ] ) ;
121
122
122
123
await ctr . stdout ( ) ;
@@ -151,7 +152,7 @@ export async function publish(
151
152
. withExec ( [ "pkgx" , "install" , "docker" ] )
152
153
. withExec ( [ "docker" , "-v" ] )
153
154
. withServiceBinding ( "dockerd" , docker ( DOCKER_VERSION , true ) )
154
- . withEnvVariable ( "DOCKER_HOST" , "tcp://dockerd:2375" )
155
+ . withEnvVariable ( "DOCKER_HOST" , DOCKER_HOST )
155
156
. withSecretVariable ( "REGISTRY_PASSWORD" , secret ! )
156
157
. withExec ( [
157
158
"bash" ,
0 commit comments