@@ -131,6 +131,9 @@ extension Application {
131131 @Argument ( help: " Build directory " )
132132 var contextDir : String = " . "
133133
134+ @Flag ( name: . long, help: " Pull latest image " )
135+ var pull : Bool = false
136+
134137 public func run( ) async throws {
135138 do {
136139 let timeout : Duration = . seconds( 300 )
@@ -153,10 +156,10 @@ extension Application {
153156 }
154157
155158 group. addTask { [ vsockPort, cpus, memory, log, dnsNameservers] in
159+ let client = ContainerClient ( )
156160 while true {
157161 do {
158- let container = try await ClientContainer . get ( id: " buildkit " )
159- let fh = try await container. dial ( vsockPort)
162+ let fh = try await client. dial ( id: " buildkit " , port: vsockPort)
160163
161164 let threadGroup : MultiThreadedEventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: System . coreCount)
162165 let b = try Builder ( socket: fh, group: threadGroup)
@@ -313,7 +316,7 @@ extension Application {
313316 }
314317 return results
315318 } ( )
316- group. addTask { [ terminal, buildArg, contextDir, label, noCache, target, quiet, cacheIn, cacheOut] in
319+ group. addTask { [ terminal, buildArg, contextDir, label, noCache, target, quiet, cacheIn, cacheOut, pull ] in
317320 let config = Builder . BuildConfig (
318321 buildID: buildID,
319322 contentStore: RemoteContentStoreClient ( ) ,
@@ -329,7 +332,8 @@ extension Application {
329332 quiet: quiet,
330333 exports: exports,
331334 cacheIn: cacheIn,
332- cacheOut: cacheOut
335+ cacheOut: cacheOut,
336+ pull: pull
333337 )
334338 progress. finish ( )
335339
0 commit comments