Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker Desktop Licence Issue #313

Open
PatGet opened this issue Oct 28, 2021 · 24 comments
Open

Docker Desktop Licence Issue #313

PatGet opened this issue Oct 28, 2021 · 24 comments

Comments

@PatGet
Copy link

PatGet commented Oct 28, 2021

Hi there,
i guess this is the wrong place so please feel free to point me in/to the right direction/person/link and close this issue.

I would like to find find out what are your plans and/or what are my options regarding docker support in Visual Studio.
Docker Desktop will not be free for us with grace period ending January 31st.
I´m not that deep into the Tooling and i don´t want to underestimate the complexity here but isn´t Docker Desktop "just a Proxy" to the Deamon running in WSL2?
Would it be possible to replace it with something else and not rely on a additional paid UI Tool? I´m not really using the Desktop UI so i just need it to be able to press F5 in VS.
As we have already expensive VS Pro and Enterprise Scubscriptions (Add resharper on top) in place I´m having hard times explaining to our management why we need additional licences just for the developer experience of running a container locally.

I could imagine the following Options:
1: Docker Desktop Licence is part of VS Subscription
2: The Docker Tools work with the Docker CLI out of the Box without needing Docker Desktop
3: You describe what VS is locking for so someone (either yourself, other Tools like Rancher Desktop or the Community) could create a replacement.

best regards,
Patrick

@BigMorty
Copy link
Member

Hello @PatGet, I am the PM owner of our container tools in VS, VS Code, and VS for Mac. I don't have specific answers to your questions at this time, but I wanted to reply and let you know this is a topic my team has been discussing.

Addressing your question "isn´t Docker Desktop "just a Proxy" to the Deamon running in WSL2", take a look at this blog post from the Docker team - https://www.docker.com/blog/looking-for-a-docker-alternative-consider-this/

@jsheetzati
Copy link

Also interested in options to avoid Docker Desktop licensing. Can we make VS2022 container tools work with Docker or Podman running in WSL2? Rather than needing Docker Desktop installed on Windows

@MDendura
Copy link

MDendura commented Feb 2, 2022

Assuming that the VS Container Tools are using the Docker CLI internally, I think a configuration option to allow us to switch between running docker --args.... and podman --args... would be pretty useful here.

That way if we don't want to install Docker Desktop and pay the license fee we could switch to Podman instead.

@adrilmorell
Copy link

adrilmorell commented May 15, 2022

Also using Docker Container tools for VS and now that I need to swith to docker in WSL2 without Docker Desktop I find out that it is not supported.
I guess the problem was with the docker-compose not being part of the cli but this is not longer the case from version 20.10.3 https://docs.docker.com/engine/release-notes/#201013. Is there any plans to switch into docker compose now that docker server supports it?

@dbreshears
Copy link
Member

Hi @adrianleonmorell, there are no plans to switch into docker compose as suggested. We do still require Docker Desktop currently with the VS tooling as it is the most straightforward acquisition experience for Docker on Windows and helps us with other items such as volume mounts for containers backed by WSL2, etc..
However, we are investigating enabling alternative container options such as you describe but too early to give a timeframe

@MPCoreDeveloper
Copy link

I had expected this to be solved by now 😕 , but I guess I had almost locked myself in to a Docker subscription.

I have to stop using vs 2022 to build containers and move to VSCode on Linux for that?

@BigMorty
Copy link
Member

The latest version of VS 2022/.NET can build containers without a Dockerfile and without docker installed! This works great when you just want to build a Docker image and then deploy it to the cloud. In fact, this is built into the publish flow for Azure Container Apps.

https://devblogs.microsoft.com/dotnet/announcing-builtin-container-support-for-the-dotnet-sdk/

@MPCoreDeveloper
Copy link

I have the latest version of Visual studio Preview and Visual Studio 2022 the current version , however when I do not have Docker on my system I loose the options of creating a Docker container from the GUI of the IDE .

But okay with this link i could create myself some scripts and see if this will work , my use case is creating a container pushing it to a Azure repo and then running it on a on-premises K8S system.

But I miss that just setting a click on a project and having everything from the VS 2022 Enterprise IDE as I did in the past on our companies dev system .

@BigMorty
Copy link
Member

Here is how you can do this in the VS 2022 UI. This is a new .NET 6.0 web app I just created WITHOUT Docker support added. Right click on the project and select Publish
image

Select Docker Container Registry
image

Select Azure Container Registry
image

Select an existing Registry or create a new one
image

Select .NET SDK since you don't have Docker Desktop installed OR a Dockerfile (pretty cool, huh!)
image

Then click Publish and VS/.NET will build the image and push it to your Azure Container Registry (ACR)
image

TaDa!!!
image

@zane-woodard-drc
Copy link

The latest version of VS 2022/.NET can build containers without a Dockerfile and without docker installed! This works great when you just want to build a Docker image and then deploy it to the cloud. In fact, this is built into the publish flow for Azure Container Apps.

https://devblogs.microsoft.com/dotnet/announcing-builtin-container-support-for-the-dotnet-sdk/

This seems to be missing a big use case for VS Container tools, which is building, running, and debugging containers during the development process. Creating a docker image was never a big problem, building & debugging the the app in the container is. VS Container tools is great for this, I'm using a docker-compose.yml to build & run my primary app and also startup several dependencies (SQL Server, Cosmos Emulator, some other microservices) with 1 click in the IDE.

However, for some confusing reason, VS Container tools has a dependency on Docker Desktop rather than the daemon -- which makes it impossible to avoid the Docker Desktop licensing problem and do things like switch to Podman.

Furthermore, how many developers are actually publishing docker images straight from Visual Studio? I'd wager not very many. Maybe 10 years ago that would make sense, but with tools like GitHub Action of ADO Pipelines it's rare for devs to be doing this directly in a VS GUI.

@BigMorty
Copy link
Member

I was just making sure you new a way in VS to build and publish, agree CI/CD is the robust way to go.

Regarding VS requiring Docker Desktop, I will defer to @dbreshears and the tooling team to see if they are looking to change that.

@LeaFrock
Copy link

LeaFrock commented Oct 6, 2023

This problem blocks some avenues of learning/working. For example, eShopOnDapr uses docker compose as default. Since there's only podman in my environment, VS always outputs the following errors.

image

podman is compatible (and better in some degree) but not be supported as a first-class citizen, while docker is the only tool-SDK winner. It looks a bit weird.

@matdmul
Copy link

matdmul commented Nov 26, 2023

Hey @BigMorty @dbreshears I do appreciate all the work that your team are putting into this. Any update? Similar to @LeaFrock, when attempting to run a docker-compose service in Visual Studio 2022, I see:

Severity	Code	Description	Project	File	Line	Suppression State
Error	DT1001	Unable to run 'docker-compose'. Verify that Docker Desktop is installed and running locally. For troubleshooting, please refer to https://aka.ms/DockerToolsTroubleshooting.
If the error persists, try restarting Docker Desktop.	docker-compose	C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.VisualStudio.Docker.Compose.targets	425	

(Apologies if I've picked out the wrong thread for my issue, please redirect me to create this where it needs to live)

On my system I have docker, docker-compose and podman installed. All are able to run the docker-compose services.

I was hoping there might be some way to point Microsoft.Docker.Sdk to where docker-compose IS installed to avoid this issue, rather than insisting I have Docker Desktop available? What joy can I hope for here? 🤞

@zs-dima
Copy link

zs-dima commented Dec 23, 2023

+1

@stevenmolencsat
Copy link

+1. The ability to use podman or rancher desktop for those of us well into our container experience and tired of the performance problems and licensing problems that come with docker desktop would be optimal. Please and thank you.

@NCarlsonMSFT
Copy link
Member

@stevenmolencsat While Docker Desktop remains our supported and tested container runtime, we don't block alternatives. I just did a quick test on 17.10 using Podman Desktop and was able to debug in a container from VS.

@AdrianoAE
Copy link

@stevenmolencsat While Docker Desktop remains our supported and tested container runtime, we don't block alternatives. I just did a quick test on 17.10 using Podman Desktop and was able to debug in a container from VS.

May you share the setup, because as already mentioned VS refuses to even attempt to start the containers because Docker Desktop is not installed, we tried all the workarounds we could find and nothing worked

@e-master
Copy link

fwiw, i switched from Podman to Rancher Desktop and everything works like a charm in VS now. Sure, the UI is not as nice as in podman, but that wasn't a deal breaker for me.

@NCarlsonMSFT
Copy link
Member

NCarlsonMSFT commented Jun 24, 2024

@AdrianoAE, sorry I did skip a step. I had previously installed the docker cli (not the Engine or Docker Desktop) and added it to %Path%

@codekoenig
Copy link

@NCarlsonMSFT I'm able to use Podman with Visual Studio for docker build, but there is an issue with docker compose: Visual Studio looks for the following file during a docker compose task: \AppData\Roaming\Docker\settings.json - this file, I found out, is placed there by installing Docker Desktop, but ofc this does not happen when installing Podman.

Is there a specific reason for the need of this file or is there any recommended workaround?

@NCarlsonMSFT
Copy link
Member

@codekoenig sorry for the delay. The machine I'd been using to test podman went sideways and required re-imaging.
Testing on my new clean machine I was able to F5 a compose project without issue.

Looking through our code, the only place we would check for that file is part of determining why launching failed. Can you provide any more context around what you are seeing?

FYI if you set VSCT_WslDaemon=1 we'll use WSL paths, and we won't run any Docker Desktop specific checks. Podman Desktop supports both windows and WSL paths so this may be an interesting option for you.

@codekoenig
Copy link

@NCarlsonMSFT no delay noticed, thanks for getting back to me 😊

Ah, that explains a lot. In the meantime I placed a dummy file there to get over this step and yes, then I noticed that it would still fail as docker compose is missing - I erroneously thought the DockerCLI comes with it. There's no way to install it standalone (without Docker Desktop) on Windows it seems, but as you mention VSCT_WslDaemon=1 I guess what you did is installing compose in WSL?

@NCarlsonMSFT
Copy link
Member

NCarlsonMSFT commented Oct 4, 2024

@codekoenig Getting docker-compose w/o Docker Desktop is documented here: https://docs.docker.com/compose/install/standalone/
You'll need to place the exe in %userprofile%\.docker\cli-plugins to be picked up by the docker CLI and activate docker compose support

@codekoenig
Copy link

Thanks very much @NCarlsonMSFT … I was hesitant on that as on the main page it was referring to that solution as unsupported:

Warning
This install scenario is not recommended and is only supported for backward compatibility purposes.

But if it works for you, I can safely ignore this :)

Thanks to the team for making this possible, while Docker Desktop is great, the licensing is an issue especially when someone works with multiple companies. Most of all if all you really need is only the Visual Studio support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests