restic-compose-backup/restic_volume_backup/utils.py

12 lines
274 B
Python
Raw Normal View History

import docker
2019-04-15 17:49:57 +00:00
from restic_volume_backup.config import Config
def list_containers():
2019-04-16 00:22:23 +00:00
"""Easily mockable container list"""
2019-04-15 17:49:57 +00:00
client = docker.Client(base_url=Config.docker_base_url)
all_containers = client.containers()
client.close()
return all_containers