I trying to create network in docker-compose.vs.debug.yml file:
networks:
myNetwork:
driver: bridge
But docker adding some identifier:
I assume you use a VS2017 dcproj. I solved this by creating the network manually in the dcproj project as a PreBuildEvent. Add a prebuild target to the .dcproj file:
Then in your docker-compose files you can specify an external network:
networks:
default:
external:
name: customnetwork
Requires you to start the dcproj before other projects or add the same prebuild exec to all the projects that should share the network.