Can not scale service to multiple container when binding host port in docker-compose.yml
<p>Micro service is running on one container. I have bound that service to Host port <code>8082</code> and launched this micro service using <code>docker-compose</code>. Now I want to scale it to 3 container using <code>docker-compose scale</code> command but it giving me following error- </p>

<blockquote>
  <p>ERROR: for 2  failed to create endpoint composetest_nginx_2 on network
  composetest_default: Bind for 0.0.0.0:8082 failed: port is already
  allocated</p>
  
  <p>ERROR: for 3  failed to create endpoint composetest_nginx_3 on network
  composetest_default: Bind for 0.0.0.0:8082 failed: port is already
  allocated</p>
</blockquote>

<p>What would be the solution for this? </p>