Thanks for your input!

In fact there’s a better way. I see some use an environment variable to define the docker network name. For example, take a look on “basic network” and see the docker-compose.yml,


And you can find the file .env


Then the network name becomes net_basic.

cheers, kc

Written by

Happy to share what I learn on blockchain. Visit for my works. or reach me on

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store