title: Docker Compose - Image name
body: <p>When you are running a <strong>docker-compose up -d</strong> command, by default the build image is going to take the name of the current folder.</p>
  
  <p>So for example for this <strong>docker-compose.yml</strong> file my image will be named:
  <strong>dockersymfony_php</strong> because my current folder is named <strong>docker-symfony</strong> and I indicated <strong>php</strong> for my image in my yaml file</p>
  
  <pre><code>php:
      build: ./docker/php
      container_name: symfony
  </code></pre>
  
  <p>Is there a way to override that ?
  Like <strong>container_name</strong> to renaming the container...</p>
  
  <p>I know that the command <strong>docker build -t  .</strong> can do it but I need to use my <strong>docker-compose.yml</strong> file.</p>