title: Set CMD docker container without rebuilding
body: <p>Can we change the CMD of the container.</p>
  
  <p>this is what i did run</p>
  
  <pre><code>$ docker run -it stock_image sh
  sh@docker # did some changes here
  $ # exited container
  $ docker commit [commit-id] new_image 
  </code></pre>
  
  <p>I looked into <code>docker inpsect new_image</code> the CMD variable has been lost, I know it can be solved using build process using <strong>Dockerfile</strong> but I'm curious can we set docker image CMD any how?</p>
  
  <p>Reason I want to do this, <strong>docker-compose.yml</strong> cannot set the CMD (i'm not sure, hoping it can do), since I have to do few changes entering the container using <code>docker exec</code> then commit it rather than re-doing the whole process.</p>
  
  <p>P.S. i was adding <code>pdo pdo_mysql mysqli</code> to <code>php:7.2.5-fpm-alpine3.6</code> image</p>