mirror of
https://github.com/ZettaIO/restic-compose-backup.git
synced 2025-09-28 06:35:24 +00:00
Move container listing to utils module for each mocking
This commit is contained in:
8
restic_volume_backup/utils.py
Normal file
8
restic_volume_backup/utils.py
Normal file
@@ -0,0 +1,8 @@
|
||||
import docker
|
||||
|
||||
|
||||
def list_containers():
|
||||
client = docker.Client(base_url=DOCKER_BASE_URL)
|
||||
all_containers = client.containers()
|
||||
client.close()
|
||||
return all_containers
|
Reference in New Issue
Block a user