mirror of
https://github.com/ZettaIO/restic-compose-backup.git
synced 2025-09-28 06:35:24 +00:00
13 lines
296 B
Python
13 lines
296 B
Python
import docker
|
|
|
|
from restic_volume_backup.config import Config
|
|
|
|
|
|
def list_containers():
|
|
"""Easily mockable container list"""
|
|
config = Config()
|
|
client = docker.Client(base_url=config.docker_base_url)
|
|
all_containers = client.containers()
|
|
client.close()
|
|
return all_containers
|