Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does "--" mean in this Docker compose command? [duplicate]

https://docs.docker.com/compose/startup-order/

Could someone point me to some docs or general knowledge of what the "--" means in this docker command?

command: ["./wait-for-it.sh", "db:5432", "--", "python", "app.py"]

I've always been weak at bash and unix things and wanted to learn more.

like image 212
snakesNbronies Avatar asked Feb 04 '26 19:02

snakesNbronies


1 Answers

The precise semantics of options depend entirely on the command. In this case, examine the documentation or source code of wait-for-it.sh. But commonly, a double dash is used to signal the end of options. Here, it looks like the arguments before the double dash are parameters for the script itself, and the stuff after the double dash is a command line (which could conceivably contain additional options, which should not be misunderstood as options for wait-for-it.sh itself).

like image 71
tripleee Avatar answered Feb 06 '26 09:02

tripleee