mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-05-20 10:27:46 +08:00
Merge pull request #1870 from tianon/invoke-entrypoint-fixes
This commit is contained in:
commit
c30bcade2c
@ -726,6 +726,9 @@ func parseInvokeConfig(invoke string) (cfg invokeConfig, err error) {
|
||||
cfg.Cmd = append(cfg.Cmd, value) // TODO: support JSON
|
||||
case "entrypoint":
|
||||
cfg.Entrypoint = append(cfg.Entrypoint, value) // TODO: support JSON
|
||||
if cfg.Cmd == nil {
|
||||
cfg.Cmd = []string{}
|
||||
}
|
||||
case "env":
|
||||
cfg.Env = append(cfg.Env, value)
|
||||
case "user":
|
||||
|
@ -282,6 +282,7 @@ func (m *monitor) startInvoke(ctx context.Context, pid string, cfg controllerapi
|
||||
}
|
||||
if len(cfg.Entrypoint) == 0 && len(cfg.Cmd) == 0 {
|
||||
cfg.Entrypoint = []string{"sh"} // launch shell by default
|
||||
cfg.Cmd = []string{}
|
||||
}
|
||||
go func() {
|
||||
// Start a new invoke
|
||||
|
Loading…
x
Reference in New Issue
Block a user