title: How to create a docker service without project name prefix in its name?
body: <p>I have just started learning Docker to build Microservices. I am trying to understand and follow <a href="https://github.com/dotnet-architecture/eShopOnContainers" rel="nofollow noreferrer">eShopOnContainers</a> app as my reference application to understand all the concepts. For testing, I created two ASP.Net Web API services and created a docker-compose.yml file to test if I can run them. I am able to run the services but one thing I have noticed is that service names are not very tidy. They contain the folder name prefix. For example here is part of my docker-compose.yml file</p>
  <pre><code>services:
    orders-api:
      image: orders-api
      build:
        context: .
        dockerfile: src/Services/Orders/Dockerfile
      ports:
        - &quot;1122:80&quot;
  </code></pre>
  <p>I am expecting that when this service runs, it should be named orders-api but instead it's name becomes micrservicestest_orders-api_1. MicroservicesTest is the folder name of my project. I was trying to find a way around it but it <a href="https://github.com/docker/compose/issues/1518" rel="nofollow noreferrer">seems</a> like this is the limitation of Docker itself. The only thing I don't understand is that when I run the sample app of eShopOnContainers, their services have readable names without any prefixes. How are they able to generate more readable service names?</p>
  <p>Can you please tell me what am I missing here?</p>