diff --git a/pkg/compose/build_classic.go b/pkg/compose/build_classic.go index 6f76999cf..6b578dd7e 100644 --- a/pkg/compose/build_classic.go +++ b/pkg/compose/build_classic.go @@ -143,17 +143,8 @@ func (s *composeService) doBuildClassicSimpleImage(ctx context.Context, options return "", err } - // if up to this point nothing has set the context then we must have another - // way for sending it(streaming) and set the context to the Dockerfile - if dockerfileCtx != nil && buildCtx == nil { - buildCtx = dockerfileCtx - } - progressOutput := streamformatter.NewProgressOutput(progBuff) - var body io.Reader - if buildCtx != nil { - body = progress.NewProgressReader(buildCtx, progressOutput, 0, "", "Sending build context to Docker daemon") - } + body := progress.NewProgressReader(buildCtx, progressOutput, 0, "", "Sending build context to Docker daemon") configFile := s.configFile() creds, err := configFile.GetAllCredentials() diff --git a/pkg/compose/create.go b/pkg/compose/create.go index 637d4c5ea..e5e23e29f 100644 --- a/pkg/compose/create.go +++ b/pkg/compose/create.go @@ -173,6 +173,10 @@ func prepareServicesDependsOn(p *types.Project) error { dependencies = append(dependencies, spec[0]) } + for _, link := range service.Links { + dependencies = append(dependencies, strings.Split(link, ":")[0]) + } + if len(dependencies) == 0 { continue }