I have created an ASP.NET CORE api and added Docker support to the project (sftt.app). I also have a MongoDB instance in another container (sftt.db). In order to ease connecting the application to the Database, I use the name of the Database container in the connection string. This requires that both containers be connected to a Docker Network, which I have named sftt-net. When I start the container for sftt.app I would like to automatically connect to sftt-net as part of it's docker run just as I do with my database, however I can't find an option for doing this in Visual Studio.
I tried adding a command line argument "commandLineArgs": "--network sftt-net" in the launchSettings.json file, but that didn't work. (I also tried connect sftt-net sftt.app)
How can I add the api container to the Network on startup when it's launched from Visual Studio?