mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-06 05:31:47 +00:00
Add ulimit to docker build.
Signed-off-by: Lei Jitang <leijitang@huawei.com>
This commit is contained in:
@@ -37,6 +37,7 @@ import (
|
||||
"github.com/docker/docker/pkg/stringid"
|
||||
"github.com/docker/docker/pkg/symlink"
|
||||
"github.com/docker/docker/pkg/tarsum"
|
||||
"github.com/docker/docker/pkg/ulimit"
|
||||
"github.com/docker/docker/runconfig"
|
||||
"github.com/docker/docker/utils"
|
||||
)
|
||||
@@ -129,6 +130,7 @@ type builder struct {
|
||||
cgroupParent string
|
||||
memory int64
|
||||
memorySwap int64
|
||||
ulimits []*ulimit.Ulimit
|
||||
|
||||
cancelled <-chan struct{} // When closed, job was cancelled.
|
||||
|
||||
|
||||
@@ -615,6 +615,7 @@ func (b *builder) create() (*daemon.Container, error) {
|
||||
CgroupParent: b.cgroupParent,
|
||||
Memory: b.memory,
|
||||
MemorySwap: b.memorySwap,
|
||||
Ulimits: b.ulimits,
|
||||
}
|
||||
|
||||
config := *b.Config
|
||||
|
||||
@@ -21,6 +21,7 @@ import (
|
||||
"github.com/docker/docker/pkg/progressreader"
|
||||
"github.com/docker/docker/pkg/streamformatter"
|
||||
"github.com/docker/docker/pkg/stringid"
|
||||
"github.com/docker/docker/pkg/ulimit"
|
||||
"github.com/docker/docker/pkg/urlutil"
|
||||
"github.com/docker/docker/registry"
|
||||
"github.com/docker/docker/runconfig"
|
||||
@@ -62,6 +63,7 @@ type Config struct {
|
||||
CPUSetCpus string
|
||||
CPUSetMems string
|
||||
CgroupParent string
|
||||
Ulimits []*ulimit.Ulimit
|
||||
AuthConfigs map[string]cliconfig.AuthConfig
|
||||
|
||||
Stdout io.Writer
|
||||
@@ -205,6 +207,7 @@ func Build(d *daemon.Daemon, buildConfig *Config) error {
|
||||
cgroupParent: buildConfig.CgroupParent,
|
||||
memory: buildConfig.Memory,
|
||||
memorySwap: buildConfig.MemorySwap,
|
||||
ulimits: buildConfig.Ulimits,
|
||||
cancelled: buildConfig.WaitCancelled(),
|
||||
id: stringid.GenerateRandomID(),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user