Skip to content

Commit

Permalink
Merge pull request #1457 from jedevc/add-hosts-length-check
Browse files Browse the repository at this point in the history
build: don't set add-hosts option if empty
  • Loading branch information
tonistiigi authored Dec 9, 2022
2 parents 1e72e32 + 98049e7 commit abc8121
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion build/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,9 @@ func toSolveOpt(ctx context.Context, node builder.Node, multiDriver bool, opt Op
if err != nil {
return nil, nil, err
}
so.FrontendAttrs["add-hosts"] = extraHosts
if len(extraHosts) > 0 {
so.FrontendAttrs["add-hosts"] = extraHosts
}

// setup shm size
if opt.ShmSize.Value() > 0 {
Expand Down

0 comments on commit abc8121

Please sign in to comment.