CMD vs ENTRYPOINT?

ENTRYPOINT sets the executable that always runs; CMD provides default arguments (or a default command if there is no ENTRYPOINT). Arguments to docker run replace CMD but are appended to ENTRYPOINT.