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

Commit 9df3618

Browse files
committed
Adding registry auth flag
Signed-off-by: Eric Willis <eric@ecwillis.com>
1 parent 347faec commit 9df3618

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

cmd/docker-app/deploy.go

Lines changed: 10 additions & 7 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
}
@@ -76,5 +78,6 @@ func runDeploy(dockerCli command.Cli, flags *pflag.FlagSet, appname string, opts
7678
return stack.RunDeploy(dockerCli, flags, rendered, deployOrchestrator, options.Deploy{
7779
Namespace: stackName,
7880
ResolveImage: swarm.ResolveImageAlways,
81+
SendRegistryAuth: opts.deploySendRegistryAuth,
7982
})
8083
}

0 commit comments

Comments
 (0)