Cleanup cmd on entrypoint setting

Fixes #5147
Yeah. I can try to write override logic only for CMD from base image. Is it ok?