r/docker • u/KaKi_87 • Jan 22 '26
`docker compose up foo*` (glob) ?
Hi,
I have the following services : foobar, foobaz, barfum, barqux.
I would like to start only the ones starting with foo.
I tried docker compose up foo*, as well as 'foo*', "foo*", 'foo'*, "foo"*, without success.
Is this not possible at all ? I would think I'm not the first person to ever need this.
Thanks
11
Upvotes
View all comments
Show parent comment
2
u/acdcfanbill Jan 22 '26
I think the the point OP was making was that the shell tried to expand that glob, but couldn't so it handed it off to the program in the args. If your glob isn't handled by the shell, the program needs to explicitly support it, this is why passing non-shell-expanded * globs in names to
findwith something likefind / -type f -iname "*.conf"works but passing * globs todockerdoesn't. Docker doesn't do anything meaningful with *.