mirror of
https://github.com/apple/container.git
synced 2026-08-28 11:26:32 +00:00
[builder]: enable ssh forwarding for container build (#1508)
This commit is contained in:
@@ -268,6 +268,7 @@ public struct Builder: Sendable {
|
||||
public let contentStore: ContentStore
|
||||
public let buildArgs: [String]
|
||||
public let secrets: [String: Data]
|
||||
public let ssh: String
|
||||
public let contextDir: String
|
||||
public let dockerfile: Data
|
||||
public let dockerignore: Data?
|
||||
@@ -289,6 +290,7 @@ public struct Builder: Sendable {
|
||||
contentStore: ContentStore,
|
||||
buildArgs: [String],
|
||||
secrets: [String: Data],
|
||||
ssh: String,
|
||||
contextDir: String,
|
||||
dockerfile: Data,
|
||||
dockerignore: Data?,
|
||||
@@ -309,6 +311,7 @@ public struct Builder: Sendable {
|
||||
self.contentStore = contentStore
|
||||
self.buildArgs = buildArgs
|
||||
self.secrets = secrets
|
||||
self.ssh = ssh
|
||||
self.contextDir = contextDir
|
||||
self.dockerfile = dockerfile
|
||||
self.dockerignore = dockerignore
|
||||
@@ -356,6 +359,9 @@ public struct Builder: Sendable {
|
||||
for (id, data) in config.secrets {
|
||||
metadata.addString(id + "=" + data.base64EncodedString(), forKey: "secrets")
|
||||
}
|
||||
if config.ssh == "default" {
|
||||
metadata.addString("default", forKey: "ssh")
|
||||
}
|
||||
for output in config.exports {
|
||||
metadata.addString(try output.stringValue, forKey: "outputs")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user