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

Support Visual Studio 2022 to run docker compose (use Rancher Desktop as a Docker Desktop replacement) #3474

Open
yehia2amer opened this issue Nov 28, 2022 · 3 comments
Labels

Comments

@yehia2amer
Copy link

Actual Behavior

Currently you cannot use Rancher Desktop as a Docker Desktop replacement to run docker compose if you are using "Visual Studio 2022"

The reason is that when running docker compose in visual studio it looks for a config file that Docker Desktop creates on installation called settings.json in the path "%AppData%/Docker "(C:\Users\YOURUSERNAME\AppData\Roaming\Docker\settings.json)
but rancher don't create this file on Installation

Current workaround:

  1. Create a new folder called "Docker" on path "C:\Users\YOURUSERNAME\AppData\Roaming"
  2. place this file in the Docker folder (you need to rename the file to settings.json as github won't let me upload json ext) settings.json
  3. Run docker compose on VS 2022 and it will work normally.

References:
https://developercommunity.visualstudio.com/t/running-docker-compose-via-vs2022-is-tied-to-docke/1669591
https://developercommunity.visualstudio.com/t/Visual-Studio-Container-tools-depend-on-/1537846

Steps to Reproduce

  1. Install Visual Studio 2022
  2. Install Rancher with moby engine
  3. Run any docker compose project

Result

Visual Studio 2022 won't run docker compose with Rancher Desktop

Expected Behavior

Rancher on installation should behave like Docker Desktop and:

  1. Create a new folder called "Docker" on path "C:\Users\YOURUSERNAME\AppData\Roaming"
  2. Place this file in the Docker folder (you need to rename the file to settings.json as github won't let me upload json ext) settings.json

Additional Information

No response

Rancher Desktop Version

1.6.2

Rancher Desktop K8s Version

1.25.4

Which container engine are you using?

moby (docker cli)

What operating system are you using?

Windows

Operating System / Build Version

Windows 10 20H2

What CPU architecture are you using?

x64

Linux only: what package format did you use to install Rancher Desktop?

No response

Windows User Only

NA

@adamkpickering
Copy link
Member

Thanks for creating an issue! It's good to have this here, since it's likely others will have this problem.

I'm not sure, however, if we should keep it open. This seems like more of a VS 2022 problem? @jandubois what is your take on this?

@jandubois
Copy link
Member

if we should keep it open.

I would like to keep the issue open for now, even if we can't do much about it directly.

We would need to investigate if just creating a default settings.json file would be sufficient, but of course we would only be able to do this if Docker Desktop itself is not installed.

I could see us maybe tying this into the Diagnostics feature, to detect if VS is installed, but Docker Desktop isn't, and then offering a "fix action" to create a default file. But this will require further research to see if this is actually useful.

Just for reference, upstream bug at microsoft/DockerTools#313

@zs-dima

This comment was marked as duplicate.

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

No branches or pull requests

4 participants