diff --git a/daemon/execdriver/lxc/lxc_template.go b/daemon/execdriver/lxc/lxc_template.go index 75c453e4c8..a4ac51ea62 100644 --- a/daemon/execdriver/lxc/lxc_template.go +++ b/daemon/execdriver/lxc/lxc_template.go @@ -115,7 +115,7 @@ lxc.cgroup.blkio.weight = {{.Resources.BlkioWeight}} {{if .Resources.OomKillDisable}} lxc.cgroup.memory.oom_control = {{.Resources.OomKillDisable}} {{end}} -{{if .Resources.MemorySwappiness}} +{{if gt .Resources.MemorySwappiness 0}} lxc.cgroup.memory.swappiness = {{.Resources.MemorySwappiness}} {{end}} {{end}}