docker / for-win

Bug reports for Docker Desktop for Windows
https://www.docker.com/products/docker#/windows
1.86k stars 291 forks source link

DockerCli.exe -SharedDrives no longer lists shared drives #12973

Closed danegsta closed 1 year ago

danegsta commented 2 years ago

Actual behavior

Running DockerCli.exe -SharedDrives outputs a warning unknown shorthand flag: 'S' in -SharedDrives and no shared drive list

Expected behavior

Running DockerCli.exe -SharedDrives outputs a list of drives that have been shared

Information

Steps to reproduce the behavior

  1. Open a command prompt and run "%ProgramFiles%\Docker\Docker\DockerCli.exe" -SharedDrives
  2. Check that you get a warning instead of a list of drives that have been shared with Docker for Windows

This particular change breaks a prerequisite check that Docker Tools for Visual Studio 2022 and 2019 use to determine if Docker file sharing was configured for a Hyper-V based Linux runtime.

christophermclellan commented 2 years ago

Hi @danegsta, thanks for flagging this. Could you share a diagnostic id when you get a moment ? https://docs.docker.com/desktop/troubleshoot/overview/#diagnose-from-the-terminal

danegsta commented 2 years ago

Hi @christophermclellan this isn't an issue with a command failing, so there's no real relevant diagnostics; the issue is that a command that was supported by the CLI in Docker Desktop versions before 4.12.0 seems to have been removed in the 4.12.0 update and said command is used by the Visual Studio container tooling to validate whether a Docker Desktop install using the Hyper-V backend is correctly configured.

I believe there was a similar issue with the command being removed back in 2020: https://github.com/docker/for-win/issues/5625

christophermclellan commented 2 years ago

Thanks for that @danegsta.

Hey @thaJeztah, I wonder whether you have any context on why %ProgramFiles%\Docker\Docker\DockerCli.exe" -SharedDrives seems to no longer function in v4.12.0 of Desktop ? cc @sam-thibault

thaJeztah commented 2 years ago

I think DockerCli.exe here is a binary that Docker Desktop ships (it's not the docker CLI, but named confusing).

christophermclellan commented 2 years ago

Ah, sorry @thaJeztah.

@danegsta - we've got a ticket for this now and are assigning to a colleague to fix it for the next release of Desktop.

docker-robott commented 1 year ago

There hasn't been any activity on this issue for a long time. If the problem is still relevant, mark the issue as fresh with a /remove-lifecycle stale comment. If not, this issue will be closed in 30 days.

Prevent issues from auto-closing with a /lifecycle frozen comment.

/lifecycle stale

sam-thibault commented 1 year ago

This command was restored in Docker Desktop 4.14.0.

docker-robott commented 1 year ago

Closed issues are locked after 30 days of inactivity. This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

/lifecycle locked

chelnak commented 1 year ago

Hey @danegsta, are you still relying on this CLI for Visual Studio?