Skip to content

Commit

Permalink
Fix docker build regression
Browse files Browse the repository at this point in the history
  • Loading branch information
aledbf committed Aug 24, 2022
1 parent 2c93845 commit 98f2bc8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/leeway/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -1158,13 +1158,14 @@ func (p *Package) buildDocker(buildctx *buildContext, wd, result string) (res *p
if cfg.Dockerfile == "" {
return nil, xerrors.Errorf("dockerfile is required")
}

dockerfile := filepath.Join(p.C.Origin, cfg.Dockerfile)
if _, err := os.Stat(dockerfile); os.IsNotExist(err) {
return nil, err
}

var buildCommands [][]string
buildCommands = append(buildCommands, []string{"cp", cfg.Dockerfile, "Dockerfile"})
buildCommands = append(buildCommands, []string{"cp", dockerfile, "Dockerfile"})
for _, dep := range p.GetDependencies() {
fn, exists := buildctx.LocalCache.Location(dep)
if !exists {
Expand Down

0 comments on commit 98f2bc8

Please sign in to comment.