vscode-remote-release icon indicating copy to clipboard operation
vscode-remote-release copied to clipboard

Error: "Docker version 17.12.0 or later required on remote host" when select "Attach Visual Studio Code"

Open SgtErnestBilko opened this issue 3 years ago • 9 comments

  • VSCode Version: 1.83.1

  • Local OS Version: MacOS 12.5

  • Remote OS Version: MacOS 12.6.2

  • Remote Extension/Connection Type: Dev Containers v0.315.1 (local) Docker v1.26.1 (remote)

  • Docker desktop for Mac (remote): 4.24.2

  • Logs:

Dev Container log

[515226 ms] Start: Run in Host: docker version --format {{.Server.APIVersion}} [515232 ms] Host server: Error: spawn docker ENOENT at ChildProcess._handle.onexit (node:internal/child_process:283:19) at onErrorNT (node:internal/child_process:476:16) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) [515236 ms] Host server: (node:42024) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 4) [515236 ms] spawn docker ENOENT [515238 ms] CLI host's PATH: /usr/bin:/bin:/usr/sbin:/sbin

Steps to Reproduce:

This has worked since installation (Jan 2023) the error only started yesterday afternoon.

  1. SSH onto remote
  2. Right click docker container (using docker extension) and select "Attach Visual Studio Code"
  3. Error message "Docker version 17.12.0 or later required on remote host"
  4. I have deleted .vscode-server and .vscode-remote-containers and restarted VSCode - same issue
  5. I downgraded to previously working VSCode1.82.2 and Docker desktop 4.16.2 - same issue

SgtErnestBilko avatar Oct 16 '23 05:10 SgtErnestBilko

Downgraded to Dev Containers v.309 fixed the issue Happy to help troubleshoot latest version v315 if a developer would like to make ocntact

SgtErnestBilko avatar Oct 16 '23 20:10 SgtErnestBilko

the same issue: [77389 ms] Start: Run in Host: docker version --format {{.Server.APIVersion}} [77438 ms] Host server: Error: spawn docker ENOENT at ChildProcess._handle.onexit (node:internal/child_process:283:19) at onErrorNT (node:internal/child_process:476:16) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) [77483 ms] spawn docker ENOENT [77500 ms] Host server: (node:3896) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 1) (Use node --trace-warnings ... to show where the warning was created) [77798 ms] CLI host's PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

downgraded dev containers v.309.0 ,it's not work! image

lixiaoqin0218 avatar Nov 27 '23 15:11 lixiaoqin0218

I am facing the same issue. Downgrading Dev Containers v.0.309 doesn't work for me

yennhi95zz avatar Jan 25 '24 14:01 yennhi95zz

I am facing the same issue. Downgrading Dev Containers v.0.309, v.0.315 doesn't work for me 😢

Natielle avatar Mar 14 '24 21:03 Natielle

In my case the docker path was wrong. To resolve, I check my docker path with which docker.

So I press Command + Shift + P -> Dev Containers: Settings -> Find Docker Path configuration -> Paste the result (which is a path) of the which docker command and try use Dev container again

Natielle avatar Mar 14 '24 21:03 Natielle

Thanks @Natielle! Your suggestion helped 🙌

Tip for others: Restart VSCode to load the changes.

Ompragash avatar Jul 27 '24 00:07 Ompragash

Thanks @Natielle!! After many hours of failed attempts, you have finally put me out of my misery. Dev containers are finally working - as expected - on my macbook.

mrmichaelkane avatar Dec 03 '24 07:12 mrmichaelkane

Please check the Dev Containers log from when this happens. (F1 > Dev Containers: Show Container Log)

That will show the PATH that was found. Make sure that includes the folder docker is installed in.

Setting the Docker executable's path in the settings directly as suggested by @Natielle also works.

chrmarti avatar Dec 13 '24 08:12 chrmarti

I actually didn't follow installation correctly (for Docker/MacOS). After installing the .dmg you need to double click to accept the ToS and then reopen the VSCode terminal, you'll find the docker binary and it should work.

santi-mir avatar Dec 15 '24 15:12 santi-mir