Aleksander Cynarski
92133a6b2e
Add username to config struct, if present execute `sudo -E -u username` in command
24 lines
438 B
Go
24 lines
438 B
Go
package docker
|
|
|
|
import (
|
|
"github.com/urfave/cli/v2"
|
|
"ledo/app/modules/compose"
|
|
"ledo/app/modules/context"
|
|
)
|
|
|
|
var CmdComposeBuild = cli.Command{
|
|
Name: "build",
|
|
Aliases: []string{"b"},
|
|
Usage: "build docker image",
|
|
Description: `Build all docker images`,
|
|
Action: RunComposeBuild,
|
|
}
|
|
|
|
func RunComposeBuild(cmd *cli.Context) error {
|
|
ctx := context.InitCommand(cmd)
|
|
compose.ExecComposerBuild(ctx)
|
|
return nil
|
|
}
|
|
|
|
|