According to the doc:
There can only be one CMD instruction in a Dockerfile. If you list more than one CMD then only the last CMD will take effect.
Why would one list more than one CMD
instruction? I don't really understand this guideline. Is this like a "hack" because they are not/can not do validation of the docker file to complaint that more than 1 CMD instructions are defined or is this a real use case? I.e there is some case that we can have more than 1 CMD defined but we are ok if only the last is executed (then why were the previous defined)?
Could someone please shed some light on this?