Merge pull request #1763 from larsks/bug/missing-mem-limit
restore mem_limit
This commit is contained in:
commit
d91834bdf5
1 changed files with 6 additions and 0 deletions
|
@ -1390,10 +1390,16 @@ class DockerManager(object):
|
||||||
return docker.utils.create_host_config(**params)
|
return docker.utils.create_host_config(**params)
|
||||||
|
|
||||||
def create_containers(self, count=1):
|
def create_containers(self, count=1):
|
||||||
|
try:
|
||||||
|
mem_limit = _human_to_bytes(self.module.params.get('memory_limit'))
|
||||||
|
except ValueError as e:
|
||||||
|
self.module.fail_json(msg=str(e))
|
||||||
|
|
||||||
params = {'image': self.module.params.get('image'),
|
params = {'image': self.module.params.get('image'),
|
||||||
'command': self.module.params.get('command'),
|
'command': self.module.params.get('command'),
|
||||||
'ports': self.exposed_ports,
|
'ports': self.exposed_ports,
|
||||||
'volumes': self.volumes,
|
'volumes': self.volumes,
|
||||||
|
'mem_limit': mem_limit,
|
||||||
'environment': self.env,
|
'environment': self.env,
|
||||||
'hostname': self.module.params.get('hostname'),
|
'hostname': self.module.params.get('hostname'),
|
||||||
'domainname': self.module.params.get('domainname'),
|
'domainname': self.module.params.get('domainname'),
|
||||||
|
|
Loading…
Reference in a new issue