Docker CLI not working - Failed with: exit status 0xffffffff - docker

I have been experiencing this issue with Docker after I tried to uninstall and reinstall it.
docker run -d -p 80:80 docker/getting-started or when I type docker in command line, it gives
Cannot find file at '..\\lib\docker-cli\tools\docker\docker.exe' (C:\ProgramData\chocolatey\lib\docker-cli\tools\docker\docker.exe). This usually indicates a missing or moved file.
"C:\Program Files\Docker\Docker\resources\com.docker.diagnose.exe" check gives
[PASS] DD0027: is there available disk space on the host?
[PASS] DD0028: is there available VM disk space?
[PASS] DD0002: does the bootloader have virtualization enabled?
[SKIP] DD0018: does the host support virtualization?
[PASS] DD0001: is the application running?
[PASS] DD0022: is the Virtual Machine Platform Windows Feature enabled?
[PASS] DD0021: is the WSL 2 Windows Feature enabled?
[PASS] DD0024: is WSL installed?
[PASS] DD0025: are WSL distros installed?
[PASS] DD0026: is the WSL LxssManager service running?
[PASS] DD0029: is the WSL 2 Linux filesystem corrupt?
[PASS] DD0035: is the VM time synchronized?
[PASS] DD0017: can a VM be started?
[PASS] DD0016: is the LinuxKit VM running?
[PASS] DD0011: are the LinuxKit services running?
[PASS] DD0004: is the Docker engine running?
[PASS] DD0015: are the binary symlinks installed?
[PASS] DD0031: does the Docker API work?
[PASS] DD0013: is the $PATH ok?
[FAIL] DD0003: is the Docker CLI working? exit status 0xffffffff
[PASS] DD0005: is the user in the docker-users group?
[PASS] DD0014: are the backend processes running?
[PASS] DD0007: is the backend responding?
[PASS] DD0008: is the native API responding?
[PASS] DD0009: is the vpnkit API responding?
[PASS] DD0010: is the Docker API proxy responding?
[PASS] DD0006: is the Docker Desktop Service responding?
[PASS] DD0012: is the VM networking working?
[SKIP] DD0030: is the image access management authorized?
[PASS] DD0033: does the host have Internet access?
[PASS] DD0002: does the bootloader have virtualization enabled?
[PASS] DD0018: does the host support virtualization?
[PASS] DD0001: is the application running?
[PASS] DD0022: is the Virtual Machine Platform Windows Feature enabled?
[PASS] DD0021: is the WSL 2 Windows Feature enabled?
[PASS] DD0024: is WSL installed?
[PASS] DD0025: are WSL distros installed?
[PASS] DD0026: is the WSL LxssManager service running?
[PASS] DD0029: is the WSL 2 Linux filesystem corrupt?
[PASS] DD0035: is the VM time synchronized?
[PASS] DD0017: can a VM be started?
[PASS] DD0016: is the LinuxKit VM running?
[PASS] DD0011: are the LinuxKit services running?
[PASS] DD0004: is the Docker engine running?
[PASS] DD0015: are the binary symlinks installed?
[PASS] DD0031: does the Docker API work?
[PASS] DD0032: do Docker networks overlap with host IPs?
Please investigate the following 1 issue:
1 : The test: is the Docker CLI working?
Failed with: exit status 0xffffffff
The Docker CLI is needed to build, share and run applications.
Googling and looking up this issue on stack didn't help.
When I tried to open a workspace file on VScode, it says The docker command was not found. Make sure Docker is installed.
I have added C:\Program Files\Docker\Docker\resources\bin and C:\ProgramData\DockerDesktop\version-bin as the system's environment variables.

Related

How to mount USB to Linux Docker Container from Windows Host

I've set up a Docker container running Linux from my Windows Host. Now I need to use a USB2CAN Dongle in my Docker container. How do I mount the USB device to the Docker container?
Thanks in advance!

Cannot connect to the Docker daemon at tcp://localhost:2375

I have installed docker client on Windows Subsystem for Linux (WSL) on Windows 10.0.17763 Home.
When I run
sudo docker ps
I got:
Cannot connect to the Docker daemon at tcp://localhost:2375. Is the
docker daemon running?
and after removing docker environment variables (unset DOCKER_HOST , unset DOCKER_TLS_VERIFY , unset DOCKER_TLS_PATH), I still have the same issue with docker daemon:
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is
the docker daemon running?
When I try to start docker daemon sudo systemctl start docker I am getting:
Failed to connect to bus: No such file or directory
docker version is 19.03.4
docker compose version is 1.24.1
Also restarting LxssManager win service will not help.
What should I do?
WSL is no real Linux Kernel which is why nothing, also running the Windows Subsystem for Linux as administrator by right clicking from start menu and running sudo service docker start does not work.
There is a new version, WSL 2 which is supposed to solve the docker issue but I did not try it our so far: https://docs.docker.com/docker-for-windows/wsl-tech-preview/

How to install docker in Windows VM on a Ubuntu host?

I am trying to install a docker on a Windows VM (windows server 2016).
This VM is on an Ubuntu 16.04 host. This VM is created using VirtualBox (independent from docker or docker-machine).
When I try to install docker on the windows VM, it says "virtualization must be enabled in BIOS". When I check whether virtualization has been enabled in the windows task manager, it says virtualization is not capable. I have already enabled Hyper-V in the VM
The question is: is it possible to install docker inside a Windows VM on an Ubuntu host?
I think it is not possible to run Docker on Windows VM hosted on Ubuntu. Your Windows VM is already a virtual machine. Installing docker on this Windows requires Hyper-V which is an additiona layer of virtualization. This is not possible.

How to use kvm in a Centos 6 docker container via docker machine

I'm trying to use kvm in a Centos 6 docker container, via docker machine. My docker machine vm (vmware fusion based) supports nested VMs, but in my docker container I'm seeing:
modprobe kvm
FATAL: Could not load /lib/modules/4.1.12-boot2docker/modules.dep: No such file or directory
modprobe kvm_intel
FATAL: Could not load /lib/modules/4.1.12-boot2docker/modules.dep: No such file or directory
Any idea what I'm missing?
Docker isn't virtual machine. It is a way to package your application.
So I think that running KVM - Kernel Virtual Machine it is not possible inside docker container.
You can read about difference between Docker and other kind of virtualization on page:
https://www.docker.com/what-docker
you may need to load the kvm and kvm_intel module on the docker host before trying to run the container
https://github.com/boot2docker/boot2docker/issues/1138#issuecomment-183199287
You can use KVM simple container in DockerHub. Source code is available on GitHub and has been tested in DockerHosts with Ubuntu 16.04, Centos 7, Centos-Atomic 7.2 and RancherOS.

Docker inside Windows guest virtual machine

I use Debian Jessie as a VirtualBox host.
I have a Windows 7 virtual machine guest, what I use for development purposes.
I want to install docker.
In order to install docker for Windows I need Boot2docker.exe.
Boot2docker itself is a VirtualBox virual machine.
It requires enable VT-x.
That doesn't seem to work.
VirtualBox error message:
VT-x is not available (VERR_VMX_NO_VMX)
E_FAIL (0x80004005)
Console
IConsole {8ab7c520-2442-4b66-8d74-4ff1e195d2b6}
You want to run Docker client on your Windows development VM. Now you want to create a boot2docker linux VM inside the windows VM to run the docker deamon on. I think it's better to run the docker deamon on your Debian host system and let the docker client talk to the host system.
See
https://docs.docker.com/engine/docker-overview/#the-docker-client

Resources