title: How do I define the name of image built with docker-compose
body: <p>I'm using <a href="https://docs.docker.com/compose/yml/" rel="noreferrer"><strong>docker-compose</strong></a> to create my development environment. I want to build a specific image, but I don't know how to set a name for that image.</p>
  
  <pre><code>wildfly:
    build: /path/to/dir/Dockerfile
    container_name: wildfly_server
    ports:
     - 9990:9990
     - 80:8080
    environment:
     - MYSQL_HOST=mysql_server
     - MONGO_HOST=mongo_server
     - ELASTIC_HOST=elasticsearch_server
    volumes:
     - /Volumes/CaseSensitive/development/wildfly/deployments/:/opt/jboss/wildfly/standalone/deployments/
    links:
     - mysql:mysql_server
     - mongo:mongo_server
     - elasticsearch:elasticsearch_server
  </code></pre>
  
  <p>When I execute <code>docker-compose</code> everything is ok, but I get a random name for the new image. Is it possible to set a name to the build image?</p>