using docker-compose.debug.yml from Visual studio for debugging purposes

  .net, .net-core, docker, docker-compose

I’m having docker-compose.yml which content I’m not supposed to change. Is it possible to use docker-compose.debug.yml which I would use to override docker-compose.yml content but only inside Visual Studio Debug and Docker profile (defined in appsettings.json)?

docker-compose.debug.yml will have an image built from local dev image file, different ports, …

The goal is to have dockerized local instance for debugging purposes and preserve original docker-compose.yml which content I’m not allowed to change.

Is this the right approach?

Do I in this case need to define specifically docker-compose.debug.yml from launchSettings.json Docker profile using commandArguments or it will be automatically called (and skip docker-compose.yml) in Visual Studio Debug & Docker profile selected?

Source: Docker Questions

LEAVE A COMMENT