Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Sources/ContainerCommands/BuildCommand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,8 @@ extension Application {

let dockerfile = try Data(contentsOf: URL(filePath: file))
let systemHealth = try await ClientHealthCheck.ping(timeout: .seconds(10))
let exportPath = systemHealth.appRoot.appendingPathComponent(".build")
let exportPath = systemHealth.appRoot
.appendingPathComponent(Application.BuilderCommand.builderResourceDir)
let buildID = UUID().uuidString
let tempURL = exportPath.appendingPathComponent(buildID)
try FileManager.default.createDirectory(at: tempURL, withIntermediateDirectories: true, attributes: nil)
Expand Down
1 change: 1 addition & 0 deletions Sources/ContainerCommands/Builder/Builder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ extension Application {
public struct BuilderCommand: AsyncParsableCommand {
public init() {}

public static let builderResourceDir = "builder"
public static let configuration = CommandConfiguration(
commandName: "builder",
abstract: "Manage an image builder instance",
Expand Down
4 changes: 3 additions & 1 deletion Sources/ContainerCommands/Builder/BuilderStart.swift
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ extension Application {

let builderImage: String = DefaultsStore.get(key: .defaultBuilderImage)
let systemHealth = try await ClientHealthCheck.ping(timeout: .seconds(10))
let exportsMount: String = systemHealth.appRoot.appendingPathComponent(".build").absolutePath()
let exportsMount: String = systemHealth.appRoot
.appendingPathComponent(Application.BuilderCommand.builderResourceDir)
.absolutePath()

if !FileManager.default.fileExists(atPath: exportsMount) {
try FileManager.default.createDirectory(
Expand Down