When running docker commands we use options like --rm -it -p. The question is why in some cases there are two dashes "--rm", and in other cases just one dash "-p"?
This is a standard Unix/Linux syntax, not specific to docker. One dash is used for single letter flags. Two dashes for an option that is more than one letter. You can merge together multiple single letter options that don't take arguments, e.g. -i
and -t
can be merged into -it
. You can run docker --help
to see all the options, some of which have both a long and short format.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With