Inconsitent incus exec

I’m trying to create some update scripts, a part needs to do this on the instance:

~ # docker compose -f /home/alp/nzbget/compose.yaml up -d
[+] Running 1/1
✔ Container nzbget Running 0.0s
~ #

But when I pass this to incus exec:

incus@incus:~$ incus exec alpine-media docker compose -f /home/alp/nzbget/compose.yaml up -d
Error: unknown shorthand flag: ‘f’ in -f
incus@incus:~$

incus exec tries to interpret your -f. Please do incus exec -- alpine-media docker compose -f /home/alp/nzbget/compose.yaml up -d. -- with no option usually means “after this, stop interpreting dashes”, allowing nested commands to take the relay.

1 Like

Many thanks for pointing this out!