Docker cmd can replace all the functions of entrypoint.

  docker, question

Docker cmd can replace all the functions of entrypoint.

ENTRYPOINTThe format andRUNInstruction format, divided intoexecFormat andshellFormat.
ENTRYPOINTThe purpose andCMDSimilarly, the procedure and parameters for starting the container are all specified.
ENTRYPOINTIt can also be replaced at run time, but it is better thanCMDIt’s a bit cumbersome and needs to be passeddocker runParameters of--entrypointTo specify.
When specifiedENTRYPOINTAfter that,CMDThe meaning of the has changed, is no longer directly run its command, but will beCMDThe contents of the are passed as parameters to theENTRYPOINTThe command, in other words, when actually executed, will become: < ENTRYPOINT> “<CMD > “