This commit is contained in:
parent
7f8ed1c018
commit
ed5061fd58
@ -338,6 +338,8 @@ func (d *Driver) Create(name string, image string, volumePath string, HTTPPort i
|
||||
}
|
||||
}
|
||||
|
||||
trueValue := true
|
||||
|
||||
createdContainer, err := cli.ContainerCreate(
|
||||
context.Background(),
|
||||
&container.Config{
|
||||
@ -356,6 +358,7 @@ func (d *Driver) Create(name string, image string, volumePath string, HTTPPort i
|
||||
CPUQuota: int64(CPU) * 1000,
|
||||
Memory: int64(memory*110/100) * 1024 * 1024, // Allow 10 % more memory so we have space for MemoryReservation
|
||||
MemoryReservation: int64(memory) * 1024 * 1024, // This should provide softer way how to limit the memory of our containers
|
||||
OomKillDisable: &trueValue,
|
||||
},
|
||||
PortBindings: portBindings,
|
||||
AutoRemove: false,
|
||||
|
Loading…
Reference in New Issue
Block a user