Cleanup cmd on entrypoint setting

Fixes #5147
Why did you change this to only set the command if there is an entrypoint?  Isn't the change in the dockerfile enough?