Micro service is running on one container. I have bound that service to Host port 8082
and launched this micro service using docker-compose
. Now I want to scale it to 3 container using docker-compose scale
command but it giving me following error-
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
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
What would be the solution for this?
I solved it by passing a port range, with the correct syntax :P
ports:
- "9110-9120:3333"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With