Both ENTRYPOINT and CMD are commands which are used for customizing the startup behavior of a container.
Both commands can be used interchangeably to serve similar purposes, but nevertheless there are subtle differences between them.
ENTRYPOINT is the right way to specify a startup command for a container.