2019-04-15 17:06:48 +00:00
|
|
|
import docker
|
2019-04-15 17:49:57 +00:00
|
|
|
|
|
|
|
from restic_volume_backup.config import Config
|
2019-04-15 17:06:48 +00:00
|
|
|
|
|
|
|
|
|
|
|
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)
|
2019-04-15 17:06:48 +00:00
|
|
|
all_containers = client.containers()
|
|
|
|
client.close()
|
|
|
|
return all_containers
|