Passing command line arguments in Docker Compose

Thank you for trying to make the code readable, however, you can use code blocks instead of non-breakable spaces. More details in the following guide: How to format your forum posts

In short, the icon (</>) is in the editor window above the text input.

Regarding your question, my example showed how you can pass variables to be used as build arguments (I answered quickly, sorry), but you can use the variable the same way for build target. If you look at your yaml you can notice the missing dollar sign, and if you don’t need it as a build argument, you can remove that part.