mirror of
https://github.com/thegeeklab/docker-tidy.git
synced 2024-11-22 04:00:40 +00:00
Merge pull request #12 from jschrantz/autoversion
Automatically determine the Docker API version to use
This commit is contained in:
commit
448bec4854
@ -66,7 +66,7 @@ def main():
|
||||
stream=sys.stdout)
|
||||
|
||||
opts = get_opts()
|
||||
client = docker.Client(timeout=opts.timeout)
|
||||
client = docker.Client(version='auto', timeout=opts.timeout)
|
||||
|
||||
matcher = build_container_matcher(opts.prefix)
|
||||
stop_containers(client, opts.max_run_time, matcher, opts.dry_run)
|
||||
|
@ -170,7 +170,7 @@ def main():
|
||||
stream=sys.stdout)
|
||||
|
||||
args = get_args()
|
||||
client = docker.Client(timeout=args.timeout)
|
||||
client = docker.Client(version='auto', timeout=args.timeout)
|
||||
|
||||
if args.max_container_age:
|
||||
cleanup_containers(client, args.max_container_age, args.dry_run)
|
||||
|
Loading…
Reference in New Issue
Block a user