We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d07ce54 commit b079283Copy full SHA for b079283
autocompose.py
@@ -1,6 +1,7 @@
1
#! /usr/bin/env python3
2
import argparse
3
import datetime
4
+import re
5
import sys
6
7
from collections import OrderedDict
@@ -77,13 +78,23 @@ def main():
77
78
action="store_true",
79
help="Create new volumes instead of reusing existing ones",
80
)
81
+ parser.add_argument(
82
+ "-f",
83
+ "--filter",
84
+ type=str,
85
+ help="Filter containers by regex",
86
+ )
87
args = parser.parse_args()
88
89
container_names = args.cnames
90
91
if args.all:
92
container_names.extend(list_container_names())
93
94
+ if args.filter:
95
+ cfilter = re.compile(args.filter)
96
+ container_names = [c for c in container_names if cfilter.search(c)]
97
+
98
struct = {}
99
networks = {}
100
volumes = {}
0 commit comments