microsoft / DockerTools

Tools For Docker, including Visual Studio Provisioning and Publishing
Other
173 stars 26 forks source link

Migration from "docker-compose" to "docker compose" command #390

Closed den4md closed 1 year ago

den4md commented 1 year ago

It seems that VS's container development tools module uses deprecated Compose V1. Official article with change list

I'm using VS 2022:

Microsoft Visual Studio Professional 2022
Version 17.6.2
VisualStudio.17.Release/17.6.2+33723.286
ASP.NET and Web Tools   17.6.326.62524
Azure App Service Tools v3.0.0   17.6.326.62524
Azure Functions and Web Jobs Tools   17.6.326.62524
Common Azure Tools   1.10
Microsoft Azure Tools for Visual Studio   2.9

My project uses Microsoft .NET Framework Version 4.8.04084 with Container Orchestrator support. Recently I've started noticing next log lines while building the project:

24>------ Build started: Project: docker-compose, Configuration: Debug Any CPU ------
24>docker-compose  -f "C:\Users\ds\project\docker-compose.yml" -f "C:\Users\ds\project\docker-compose.override.yml" -f "C:\Users\ds\project\docker-compose.vs.debug.yml" -p dockercompose16248788491128881185 --ansi never config
24>WARNING: Compose V1 is no longer supported and will be removed from Docker Desktop in an upcoming release. See https://docs.docker.com/go/compose-v1-eol/

Docs says that:

Compose V1 no longer receives updates and will not be available in new releases of Docker Desktop after June 2023.

It can postentially break the whole Container Orchestrator support for Visual Studio.

Couldn't find any info about VS and switching to Compose V2, therefore this issue is created.

dbreshears commented 1 year ago

The VS tooling should work with both Compose V1 and Compose V2. Docker Desktop controls this setting and you can find a checkbox for "Use Docker Compose V2" under Settings->General.

den4md commented 1 year ago

I found the setting. The warning is gone. Thank you! I wonder whether everyone who uses Docker Desktop should make same change.

dbreshears commented 1 year ago

Thanks for the confirmation. The default is Compose V2 for quite a while now in the latest Docker builds, so not sure why it wasn't checked for you.