Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit d9bc5b1

Browse files
authored
Merge pull request #343 from ecwillis/send-reg-auth
Send reg auth
2 parents acd516e + 73e4106 commit d9bc5b1

1 file changed

Lines changed: 12 additions & 9 deletions

File tree

cmd/docker-app/deploy.go

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,14 @@ import (
1616
)
1717

1818
type deployOptions struct {
19-
deployComposeFiles []string
20-
deploySettingsFiles []string
21-
deployEnv []string
22-
deployOrchestrator string
23-
deployKubeConfig string
24-
deployNamespace string
25-
deployStackName string
19+
deployComposeFiles []string
20+
deploySettingsFiles []string
21+
deployEnv []string
22+
deployOrchestrator string
23+
deployKubeConfig string
24+
deployNamespace string
25+
deployStackName string
26+
deploySendRegistryAuth bool
2627
}
2728

2829
// deployCmd represents the deploy command
@@ -45,6 +46,7 @@ func deployCmd(dockerCli command.Cli) *cobra.Command {
4546
cmd.Flags().StringVarP(&opts.deployKubeConfig, "kubeconfig", "k", "", "kubeconfig file to use")
4647
cmd.Flags().StringVarP(&opts.deployNamespace, "namespace", "n", "default", "namespace to deploy into")
4748
cmd.Flags().StringVarP(&opts.deployStackName, "name", "d", "", "stack name (default: app name)")
49+
cmd.Flags().BoolVarP(&opts.deploySendRegistryAuth, "with-registry-auth", "", false, "sends registry auth")
4850
if internal.Experimental == "on" {
4951
cmd.Flags().StringArrayVarP(&opts.deployComposeFiles, "compose-files", "c", []string{}, "Override Compose files")
5052
}
@@ -74,7 +76,8 @@ func runDeploy(dockerCli command.Cli, flags *pflag.FlagSet, appname string, opts
7476
stackName = internal.AppNameFromDir(app.Name)
7577
}
7678
return stack.RunDeploy(dockerCli, flags, rendered, deployOrchestrator, options.Deploy{
77-
Namespace: stackName,
78-
ResolveImage: swarm.ResolveImageAlways,
79+
Namespace: stackName,
80+
ResolveImage: swarm.ResolveImageAlways,
81+
SendRegistryAuth: opts.deploySendRegistryAuth,
7982
})
8083
}

0 commit comments

Comments
 (0)