add skip-tls-verify flag for insecure private registries (#11)

Co-authored-by: beniamin.calota <beniamin.calota@emag.ro>
This commit is contained in:
Beniamin
2021-02-18 10:19:21 +02:00
committed by GitHub
parent 3e4dad8cae
commit 9cca954ec6
2 changed files with 18 additions and 7 deletions
+6
View File
@@ -94,6 +94,11 @@ func main() {
Usage: "docker password",
EnvVar: "PLUGIN_PASSWORD",
},
cli.BoolFlag {
Name: "skip-tls-verify",
Usage: "Skip registry tls verify",
EnvVar: "PLUGIN_SKIP_TLS_VERIFY",
},
}
if err := app.Run(os.Args); err != nil {
@@ -116,6 +121,7 @@ func run(c *cli.Context) error {
Target: c.String("target"),
Repo: c.String("repo"),
Labels: c.StringSlice("custom-labels"),
SkipTlsVerify: c.Bool("skip-tls-verify"),
},
}
return plugin.Exec()