From f478c8eeb6a8496f12035e9977f48d64f2b66a56 Mon Sep 17 00:00:00 2001 From: Oliver Marks Date: Thu, 29 Sep 2016 21:18:52 +0100 Subject: [PATCH] Add in docker shm-size option, mainly for oracle xe --- build/docker/util.go | 1 + yaml/container.go | 3 +++ 2 files changed, 4 insertions(+) diff --git a/build/docker/util.go b/build/docker/util.go index f7ede3f9..ece1e312 100644 --- a/build/docker/util.go +++ b/build/docker/util.go @@ -22,6 +22,7 @@ func toContainerConfig(c *yaml.Container) *dockerclient.ContainerConfig { Privileged: c.Privileged, NetworkMode: c.Network, Memory: c.MemLimit, + ShmSize: c.ShmSize, CpuShares: c.CPUShares, CpuQuota: c.CPUQuota, CpusetCpus: c.CPUSet, diff --git a/yaml/container.go b/yaml/container.go index 77e41c1f..441744f8 100644 --- a/yaml/container.go +++ b/yaml/container.go @@ -40,6 +40,7 @@ type Container struct { DNSSearch []string MemSwapLimit int64 MemLimit int64 + ShmSize int64 CPUQuota int64 CPUShares int64 CPUSet string @@ -75,6 +76,7 @@ type container struct { DNSSearch types.StringOrSlice `yaml:"dns_search"` MemSwapLimit int64 `yaml:"memswap_limit"` MemLimit int64 `yaml:"mem_limit"` + ShmSize int64 `yaml:"shm_size"` CPUQuota int64 `yaml:"cpu_quota"` CPUShares int64 `yaml:"cpu_shares"` CPUSet string `yaml:"cpuset"` @@ -144,6 +146,7 @@ func (c *containerList) UnmarshalYAML(unmarshal func(interface{}) error) error { DNSSearch: cc.DNSSearch.Slice(), MemSwapLimit: cc.MemSwapLimit, MemLimit: cc.MemLimit, + ShmSize: cc.ShmSize, CPUQuota: cc.CPUQuota, CPUShares: cc.CPUShares, CPUSet: cc.CPUSet,