File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -274,6 +274,11 @@ func main() {
274274 Usage : "platform value to pass to docker" ,
275275 EnvVar : "PLUGIN_PLATFORM" ,
276276 },
277+ cli.StringSliceFlag {
278+ Name : "ssh-agent" ,
279+ Usage : "mount ssh agent" ,
280+ EnvVar : "PLUGIN_SSH_AGENT" ,
281+ },
277282 }
278283
279284 if err := app .Run (os .Args ); err != nil {
@@ -318,6 +323,7 @@ func run(c *cli.Context) error {
318323 AddHost : c .StringSlice ("add-host" ),
319324 Quiet : c .Bool ("quiet" ),
320325 Platform : c .String ("platform" ),
326+ SSHAgent : c .StringSlice ("ssh-agent" ),
321327 },
322328 Daemon : docker.Daemon {
323329 Registry : c .String ("docker.registry" ),
Original file line number Diff line number Diff line change 6464 AddHost []string // Docker build add-host
6565 Quiet bool // Docker build quiet
6666 Platform string // Docker build platform
67+ SSHAgent []string // Docker build ssh
6768 }
6869
6970 // Plugin defines the Docker plugin parameters.
@@ -328,6 +329,9 @@ func commandBuild(build Build) *exec.Cmd {
328329 if build .Platform != "" {
329330 args = append (args , "--platform" , build .Platform )
330331 }
332+ if build .SSHAgent != "" {
333+ args = append (args , "--ssh" , build .SSHAgent )
334+ }
331335
332336 if build .AutoLabel {
333337 labelSchema := []string {
You can’t perform that action at this time.
0 commit comments