소스 검색

run: clean service command if entrypoint is overridden (#9836)

Signed-off-by: Guillaume Lours <[email protected]>
Guillaume Lours 3 년 전
부모
커밋
279225896a
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      pkg/compose/run.go

+ 3 - 0
pkg/compose/run.go

@@ -112,6 +112,9 @@ func applyRunOptions(project *types.Project, service *types.ServiceConfig, opts
 	}
 	if opts.Entrypoint != nil {
 		service.Entrypoint = opts.Entrypoint
+		if len(opts.Command) == 0 {
+			service.Command = []string{}
+		}
 	}
 	if len(opts.Environment) > 0 {
 		cmdEnv := types.NewMappingWithEquals(opts.Environment)