mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-04 23:44:00 -07:00
Add argument to allow limiting docker container to s specific amount of memory (#37950)
* Add argument to allow limiting docker container to s specific amount of memory * Address review comments
This commit is contained in:
parent
2d0547c411
commit
5d90ebb28e
3 changed files with 10 additions and 0 deletions
|
@ -216,6 +216,12 @@ def delegate_docker(args, exclude, require):
|
|||
'--privileged=%s' % str(privileged).lower(),
|
||||
]
|
||||
|
||||
if args.docker_memory:
|
||||
test_options.extend([
|
||||
'--memory=%d' % args.docker_memory,
|
||||
'--memory-swap=0',
|
||||
])
|
||||
|
||||
docker_socket = '/var/run/docker.sock'
|
||||
|
||||
if os.path.exists(docker_socket):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue