| 554 | } |
| 555 | |
| 556 | func dockerFilePath(ctxName string, dockerfile string) string { |
| 557 | if dockerfile == "" { |
| 558 | return "" |
| 559 | } |
| 560 | contextType, _ := build.DetectContextType(ctxName) |
| 561 | if contextType == build.ContextTypeGit || contextType == build.ContextTypeRemote { |
| 562 | return dockerfile |
| 563 | } |
| 564 | if strings.Contains(ctxName, "://") { |
| 565 | return dockerfile |
| 566 | } |
| 567 | if !filepath.IsAbs(dockerfile) { |
| 568 | dockerfile = filepath.Join(ctxName, dockerfile) |
| 569 | } |
| 570 | dir := filepath.Dir(dockerfile) |
| 571 | symlinks, err := filepath.EvalSymlinks(dir) |
| 572 | if err == nil { |
| 573 | return filepath.Join(symlinks, filepath.Base(dockerfile)) |
| 574 | } |
| 575 | return dockerfile |
| 576 | } |
| 577 | |
| 578 | func (s *composeService) dryRunBake(cfg bakeConfig) map[string]string { |
| 579 | bakeResponse := map[string]string{} |