'How can I get VS2019+ to run docker compose?
I have a solution containing an Azure Function App and my app uses CosmosDb and some other services when debugging/running locally via Visual Studio.
I have a docker-compose.yml file that lets me spin up the relevant services in docker.
Currently I have to run docker compose up manually before starting my application in Visual Studio.
Is there a way to have Visual Studio automatically run docker compose up when I start start debugging and have it automatically run docker compose down when debugging ends?
Solution 1:[1]
Is there a way to have Visual Studio automatically run docker compose up when I start start debugging and have it automatically run docker compose down when debugging ends?
To run the docker compose up once done with docker compose build it takes a long time to complete the operation even if our container gets created , Then try to cancel by using ctrl+c and run again with the below given command in your terminal of visual studio docker compose up -d.
To use docker compose down it needs to choose the type to delete the images as shown below once mentioned it will delete based on your requirement.
RUNNING COMMAND SCREENSHOT FOR REFERENCE:-
For more information please refer the below links :-
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | AjayKumarGhose-MT |




