mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
build: add shm-size support
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
@ -57,6 +57,7 @@ type Options struct {
|
||||
ImageIDFile string
|
||||
ExtraHosts []string
|
||||
NetworkMode string
|
||||
ShmSize opts.MemBytes
|
||||
Ulimits *opts.UlimitOpt
|
||||
|
||||
NoCache bool
|
||||
@ -556,6 +557,11 @@ func toSolveOpt(ctx context.Context, d driver.Driver, multiDriver bool, opt Opti
|
||||
}
|
||||
so.FrontendAttrs["add-hosts"] = extraHosts
|
||||
|
||||
// setup shm size
|
||||
if opt.ShmSize.Value() > 0 {
|
||||
so.FrontendAttrs["shm-size"] = strconv.FormatInt(opt.ShmSize.Value(), 10)
|
||||
}
|
||||
|
||||
// setup ulimits
|
||||
ulimits, err := toBuildkitUlimits(opt.Ulimits)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user