title: Do I need to `docker commit` in order to push an image into a docker image registry (eg. docker hub)?
body: <p>Usually according to <a href="https://docs.docker.com/engine/reference/commandline/build/" rel="nofollow noreferrer">docs</a> In order to build a docker Image I need to follow these steps:</p>
  
  <ol>
  <li><p>Create a <code>Dockerfile</code> for my application.</p></li>
  <li><p>Run <code>docker build . Dockerfile</code> where the . is the context of my application</p></li>
  <li><p>The using <code>docker run</code> run my image into a container.</p></li>
  <li><p>Commit my image into a container</p></li>
  <li><p>Then using <code>docker push</code> push the image into a container.</p></li>
  </ol>
  
  <p>Though sometimes just launching the image into a container seems like a waste of time because I can tag my images using the parameter <code>-t</code> into the <code>docker build</code> command. So there's no need to commit a container as an image.</p>
  
  <p>So is neseserily to commit a running container as an image?</p>