mirror of https://github.com/docker/buildx.git
Merge pull request #1457 from jedevc/add-hosts-length-check
build: don't set add-hosts option if empty
This commit is contained in:
commit
abc8121aa8
|
|
@ -624,7 +624,9 @@ func toSolveOpt(ctx context.Context, node builder.Node, multiDriver bool, opt Op
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, nil, err
|
return nil, nil, err
|
||||||
}
|
}
|
||||||
so.FrontendAttrs["add-hosts"] = extraHosts
|
if len(extraHosts) > 0 {
|
||||||
|
so.FrontendAttrs["add-hosts"] = extraHosts
|
||||||
|
}
|
||||||
|
|
||||||
// setup shm size
|
// setup shm size
|
||||||
if opt.ShmSize.Value() > 0 {
|
if opt.ShmSize.Value() > 0 {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue