Aleksander Cynarski
92133a6b2e
Add username to config struct, if present execute `sudo -E -u username` in command
23 lines
457 B
Go
23 lines
457 B
Go
package docker
|
|
|
|
import (
|
|
"github.com/urfave/cli/v2"
|
|
"ledo/app/modules/compose"
|
|
"ledo/app/modules/context"
|
|
)
|
|
|
|
var CmdComposeShell = cli.Command{
|
|
Name: "shell",
|
|
Aliases: []string{"sh"},
|
|
Usage: "run shell from main service",
|
|
Description: `Execute shell cmd in main service`,
|
|
Action: RunComposeShell,
|
|
}
|
|
|
|
func RunComposeShell(cmd *cli.Context) error {
|
|
ctx := context.InitCommand(cmd)
|
|
compose.ExecComposerShell(ctx)
|
|
return nil
|
|
}
|
|
|