title: How to build an image with a custom name?
body: <p>When I build an image using <code>docker build</code>:</p>
  
  <pre><code>docker build .
  </code></pre>
  
  <p>I get an image with a random name.</p>
  
  <p>How to create a docker image with a custom name?</p>
  
  <p>I already know how to set the name in the <a href="https://stackoverflow.com/questions/38986057/how-to-set-image-name-in-dockerfile"><code>Dockerfile</code></a>, but I'm not sure how to use it in the <code>build</code> command.</p>