ledo/app/cmd/docker/login.go

33 lines
672 B
Go
Raw Permalink Normal View History

2021-11-30 16:58:09 +00:00
package docker
import (
"github.com/urfave/cli/v2"
"ledo/app/modules/context"
"ledo/app/modules/docker"
)
var CmdDockerLogin = cli.Command{
Name: "login",
Aliases: []string{"l"},
Usage: "Docker Registry login",
Description: `Login to docker registry`,
Subcommands: []*cli.Command{
&CmdDockerEcrLogin,
},
}
var CmdDockerEcrLogin = cli.Command{
Name: "ecr",
Aliases: []string{"e"},
Usage: "AWS Elastic Docker Registry",
Description: `Login to docker registry`,
Action: RunDockerEcrLogin,
}
func RunDockerEcrLogin(cmd *cli.Context) error {
ctx := context.InitCommand(cmd)
docker.DockerEcrLogin(ctx)
return nil
}