Merge pull request #3187 from hashicorp/b-windows-docker
Fix MemorySwappiness on Windows Docker
This commit is contained in:
commit
b3958faa14
|
@ -973,8 +973,11 @@ func (d *DockerDriver) createContainerConfig(ctx *ExecContext, task *structs.Tas
|
|||
VolumeDriver: driverConfig.VolumeDriver,
|
||||
}
|
||||
|
||||
// Windows does not support MemorySwap #2193
|
||||
if runtime.GOOS != "windows" {
|
||||
// Windows does not support MemorySwap/MemorySwappiness #2193
|
||||
if runtime.GOOS == "windows" {
|
||||
hostConfig.MemorySwap = 0
|
||||
hostConfig.MemorySwappiness = -1
|
||||
} else {
|
||||
hostConfig.MemorySwap = memLimit // MemorySwap is memory + swap.
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue