Add option to mount host ssh agent (--ssh)

This commit is contained in:
Ole Henning
2021-10-13 13:54:11 +02:00
committed by TP Honey
parent 94c8139150
commit 4d92e8103d
2 changed files with 10 additions and 0 deletions
+4
View File
@@ -64,6 +64,7 @@ type (
AddHost []string // Docker build add-host
Quiet bool // Docker build quiet
Platform string // Docker build platform
SSHAgent []string // Docker build ssh
}
// Plugin defines the Docker plugin parameters.
@@ -328,6 +329,9 @@ func commandBuild(build Build) *exec.Cmd {
if build.Platform != "" {
args = append(args, "--platform", build.Platform)
}
if build.SSHAgent != "" {
args = append(args, "--ssh", build.SSHAgent)
}
if build.AutoLabel {
labelSchema := []string{