Selaa lähdekoodia

support service entrypoint set as empty slice (override Dockerfile ENTRYPOINT)

close https://github.com/docker/compose/issues/8581

Signed-off-by: Nicolas De Loof <[email protected]>
Nicolas De Loof 4 vuotta sitten
vanhempi
sitoutus
0e0291510c
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 2 2
      pkg/compose/create.go

+ 2 - 2
pkg/compose/create.go

@@ -251,10 +251,10 @@ func (s *composeService) getCreateOptions(ctx context.Context, p *types.Project,
 		runCmd     strslice.StrSlice
 		entrypoint strslice.StrSlice
 	)
-	if len(service.Command) > 0 {
+	if service.Command != nil {
 		runCmd = strslice.StrSlice(service.Command)
 	}
-	if len(service.Entrypoint) > 0 {
+	if service.Entrypoint != nil {
 		entrypoint = strslice.StrSlice(service.Entrypoint)
 	}