Docker pull fails on Windows 10 in Windows Container mode - windows
I am trying to run docker natively on Windows 10 : https://learn.microsoft.com/en-us/virtualization/windowscontainers/quick-start/set-up-environment?tabs=Windows-10-Client
My Windows version is :
OS Name: Microsoft Windows 10 Pro
OS Version: 10.0.18362 N/A Build 18362.720
Docker version is :
Docker version 19.03.8, build afacb8b
{
"registry-mirrors": [],
"insecure-registries": [],
"debug": true,
"experimental": true
}
Docker Desktop Community : 2.2.0.5 (43884)
This is how the menu looks after installing : i.e. I am in "Windows Container mode"
NB : Before installing docker, I made sure "Containers" and "Hyper V" are enabled in Windows Features options.
After installing Docker, I ran this command :
docker pull ubuntu
I got this output with an error
C:\Users\angshuman>docker run ubuntu
Unable to find image 'ubuntu:latest' locally
latest: Pulling from library/ubuntu
5bed26d33875: Pull complete
f11b29a9c730: Pull complete
930bda195c84: Pull complete
78bf9a5ad49e: Pull complete
Digest: sha256:bec5a2727be7fff3d308193cfde3491f8fba1a2ba392b7546b43a051853a341d
Status: Downloaded newer image for ubuntu:latest
Error:
time="2020-04-13T17:50:47+01:00" level=error msg="Error waiting for
container: failed to shutdown container: container
21892c2c1e7edf42bb1255809605579aa79cd0b94b1d4b6edd8fd5a55aab87d2
encountered an error during hcsshim::System::waitBackground: failure
in a Windows system call: The virtual machine or container with the
specified identifier is not running. (0xc0370110): subsequent
terminate failed container
21892c2c1e7edf42bb1255809605579aa79cd0b94b1d4b6edd8fd5a55aab87d2
encountered an error during hcsshim::System::waitBackground: failure
in a Windows system call: The virtual machine or container with the
specified identifier is not running. (0xc0370110)
Any idea how to resolve the issue please ?
Edit: After suggestion in the answer below
I downgraded to 2.2.0.3 with experimental : true and Windows Container enabled:
It downloads the image this time, but still does not run.
Issue persists with a different error now.
Error:
docker: Error response from daemon: container 0bb1d91f5e1090bc83e8541d923484a1c07dd5adae7a7779ac0f080bd5c11815 encountered an error during CreateProcess: failure in a Windows system call: Unspecified error (0x80004005)
[Event Detail: failed to run runc create/exec call for container 0bb1d91f5e1090bc83e8541d923484a1c07dd5adae7a7779ac0f080bd5c11815: exit status 1 Stack Trace:
github.com/Microsoft/opengcs/service/gcs/runtime/runc.(*container).startProcess
/go/src/github.com/Microsoft/opengcs/service/gcs/runtime/runc/runc.go:580
github.com/Microsoft/opengcs/service/gcs/runtime/runc.(*runcRuntime).runCreateCommand
/go/src/github.com/Microsoft/opengcs/service/gcs/runtime/runc/runc.go:471
github.com/Microsoft/opengcs/service/gcs/runtime/runc.(*runcRuntime).CreateContainer
/go/src/github.com/Microsoft/opengcs/service/gcs/runtime/runc/runc.go:113
github.com/Microsoft/opengcs/service/gcs/core/gcs.(*gcsCore).ExecProcess
/go/src/github.com/Microsoft/opengcs/service/gcs/core/gcs/gcs.go:351
github.com/Microsoft/opengcs/service/gcs/bridge.(*Bridge).execProcess
/go/src/github.com/Microsoft/opengcs/service/gcs/bridge/bridge.go:637
github.com/Microsoft/opengcs/service/gcs/bridge.(*Bridge).execProcess-fm
/go/src/github.com/Microsoft/opengcs/service/gcs/bridge/bridge.go:253
github.com/Microsoft/opengcs/service/gcs/bridge.HandlerFunc.ServeMsg
/go/src/github.com/Microsoft/opengcs/service/gcs/bridge/bridge.go:72
github.com/Microsoft/opengcs/service/gcs/bridge.(*Mux).ServeMsg
/go/src/github.com/Microsoft/opengcs/service/gcs/bridge/bridge.go:146
github.com/Microsoft/opengcs/service/gcs/bridge.(*Bridge).ListenAndServe.func2.1
/go/src/github.com/Microsoft/opengcs/service/gcs/bridge/bridge.go:335
runtime.goexit
/usr/lib/go/src/runtime/asm_amd64.s:1333
Provider: 00000000-0000-0000-0000-000000000000]
extra info: {"CommandArgs":["-t"],"WorkingDirectory":"/","Environment":{"HOSTNAME":"0bb1d91f5e10","PATH":"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"},"CreateStdInPipe":true,"CreateStdOutPipe":true,"CreateStdErrPipe":true,"ConsoleSize":[0,0],"OCISpecification":{"ociVersion":"1.0.1-dev","process":{"user":{"uid":0,"gid":0},"args":["-t"],"env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin","HOSTNAME=0bb1d91f5e10"],"cwd":"/","capabilities":{"bounding":["CAP_CHOWN","CAP_DAC_OVERRIDE","CAP_FSETID","CAP_FOWNER","CAP_MKNOD","CAP_NET_RAW","CAP_SETGID","CAP_SETUID","CAP_SETFCAP","CAP_SETPCAP","CAP_NET_BIND_SERVICE","CAP_SYS_CHROOT","CAP_KILL","CAP_AUDIT_WRITE"],"effective":["CAP_CHOWN","CAP_DAC_OVERRIDE","CAP_FSETID","CAP_FOWNER","CAP_MKNOD","CAP_NET_RAW","CAP_SETGID","CAP_SETUID","CAP_SETFCAP","CAP_SETPCAP","CAP_NET_BIND_SERVICE","CAP_SYS_CHROOT","CAP_KILL","CAP_AUDIT_WRITE"],"inheritable":["CAP_CHOWN","CAP_DAC_OVERRIDE","CAP_FSETID","CAP_FOWNER","CAP_MKNOD","CAP_NET_RAW","CAP_SETGID","CAP_SETUID","CAP_SETFCAP","CAP_SETPCAP","CAP_NET_BIND_SERVICE","CAP_SYS_CHROOT","CAP_KILL","CAP_AUDIT_WRITE"],"permitted":["CAP_CHOWN","CAP_DAC_OVERRIDE","CAP_FSETID","CAP_FOWNER","CAP_MKNOD","CAP_NET_RAW","CAP_SETGID","CAP_SETUID","CAP_SETFCAP","CAP_SETPCAP","CAP_NET_BIND_SERVICE","CAP_SYS_CHROOT","CAP_KILL","CAP_AUDIT_WRITE"]}},"root":{"path":"rootfs"},"hostname":"0bb1d91f5e10","mounts":[{"destination":"/proc","type":"proc","source":"proc","options":["nosuid","noexec","nodev"]},{"destination":"/dev","type":"tmpfs","source":"tmpfs","options":["nosuid","strictatime","mode=755","size=65536k"]},{"destination":"/dev/pts","type":"devpts","source":"devpts","options":["nosuid","noexec","newinstance","ptmxmode=0666","mode=0620","gid=5"]},{"destination":"/sys","type":"sysfs","source":"sysfs","options":["nosuid","noexec","nodev","ro"]},{"destination":"/sys/fs/cgroup","type":"cgroup","source":"cgroup","options":["ro","nosuid","noexec","nodev"]},{"destination":"/dev/mqueue","type":"mqueue","source":"mqueue","options":["nosuid","noexec","nodev"]},{"destination":"/dev/shm","type":"tmpfs","source":"shm","options":["nosuid","noexec","nodev","mode=1777"]}],"linux":{"resources":{},"namespaces":[{"type":"mount"},{"type":"network"},{"type":"uts"},{"type":"pid"},{"type":"ipc"}],"maskedPaths":["/proc/asound","/proc/acpi","/proc/kcore","/proc/keys","/proc/latency_stats","/proc/timer_list","/proc/timer_stats","/proc/sched_debug","/proc/scsi","/sys/firmware"],"readonlyPaths":["/proc/bus","/proc/fs","/proc/irq","/proc/sys","/proc/sysrq-trigger"]},"windows":{"layerFolders":["C:\\ProgramData\\Docker\\lcow\\ef134f2d5748c591bf21cc2b407c49dd9be012dad5d15052bab87fc00b96444f","C:\\ProgramData\\Docker\\lcow\\4712bcdc17711399918c44b2352c5585457db6b14285cc6b2d6b630ef4ced551","C:\\ProgramData\\Docker\\lcow\\970a55c64e9bb9d56007e940a6ac94de463a7ad4b602f2d829f21c29b92e5369","C:\\ProgramData\\Docker\\lcow\\79eeaef19460e004253147fa7b109664492516495d6c7d63b8631112be468f7d","C:\\ProgramData\\Docker\\lcow\\0bb1d91f5e1090bc83e8541d923484a1c07dd5adae7a7779ac0f080bd5c11815"],"hyperv":{},"network":{"endpointList":["B5E11D3C-E874-406C-BCC0-94E1173E3E1B"],"allowUnqualifiedDNSQuery":true}}}}.
C:\Users\angshuman>docker run 4e5021d210f6 -it
docker: Error response from daemon: container bdd2ed406d421f00c963190cc975e5bf5f1f22b9c3536af687870257968b1fc4 encountered an error during CreateProcess: failure in a Windows system call: Unspecified error (0x80004005)
[Event Detail: failed to run runc create/exec call for container bdd2ed406d421f00c963190cc975e5bf5f1f22b9c3536af687870257968b1fc4: exit status 1 Stack Trace:
github.com/Microsoft/opengcs/service/gcs/runtime/runc.(*container).startProcess
/go/src/github.com/Microsoft/opengcs/service/gcs/runtime/runc/runc.go:580
github.com/Microsoft/opengcs/service/gcs/runtime/runc.(*runcRuntime).runCreateCommand
/go/src/github.com/Microsoft/opengcs/service/gcs/runtime/runc/runc.go:471
github.com/Microsoft/opengcs/service/gcs/runtime/runc.(*runcRuntime).CreateContainer
/go/src/github.com/Microsoft/opengcs/service/gcs/runtime/runc/runc.go:113
github.com/Microsoft/opengcs/service/gcs/core/gcs.(*gcsCore).ExecProcess
/go/src/github.com/Microsoft/opengcs/service/gcs/core/gcs/gcs.go:351
github.com/Microsoft/opengcs/service/gcs/bridge.(*Bridge).execProcess
/go/src/github.com/Microsoft/opengcs/service/gcs/bridge/bridge.go:637
github.com/Microsoft/opengcs/service/gcs/bridge.(*Bridge).execProcess-fm
/go/src/github.com/Microsoft/opengcs/service/gcs/bridge/bridge.go:253
github.com/Microsoft/opengcs/service/gcs/bridge.HandlerFunc.ServeMsg
/go/src/github.com/Microsoft/opengcs/service/gcs/bridge/bridge.go:72
github.com/Microsoft/opengcs/service/gcs/bridge.(*Mux).ServeMsg
/go/src/github.com/Microsoft/opengcs/service/gcs/bridge/bridge.go:146
github.com/Microsoft/opengcs/service/gcs/bridge.(*Bridge).ListenAndServe.func2.1
/go/src/github.com/Microsoft/opengcs/service/gcs/bridge/bridge.go:335
runtime.goexit
/usr/lib/go/src/runtime/asm_amd64.s:1333 Provider: 00000000-0000-0000-0000-000000000000] extra info: {"CommandArgs":["-it"],"WorkingDirectory":"/","Environment":{"HOSTNAME":"bdd2ed406d42","PATH":"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"},"CreateStdInPipe":true,"CreateStdOutPipe":true,"CreateStdErrPipe":true,"ConsoleSize":[0,0],"OCISpecification":{"ociVersion":"1.0.1-dev","process":{"user":{"uid":0,"gid":0},"args":["-it"],"env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin","HOSTNAME=bdd2ed406d42"],"cwd":"/","capabilities":{"bounding":["CAP_CHOWN","CAP_DAC_OVERRIDE","CAP_FSETID","CAP_FOWNER","CAP_MKNOD","CAP_NET_RAW","CAP_SETGID","CAP_SETUID","CAP_SETFCAP","CAP_SETPCAP","CAP_NET_BIND_SERVICE","CAP_SYS_CHROOT","CAP_KILL","CAP_AUDIT_WRITE"],"effective":["CAP_CHOWN","CAP_DAC_OVERRIDE","CAP_FSETID","CAP_FOWNER","CAP_MKNOD","CAP_NET_RAW","CAP_SETGID","CAP_SETUID","CAP_SETFCAP","CAP_SETPCAP","CAP_NET_BIND_SERVICE","CAP_SYS_CHROOT","CAP_KILL","CAP_AUDIT_WRITE"],"inheritable":["CAP_CHOWN","CAP_DAC_OVERRIDE","CAP_FSETID","CAP_FOWNER","CAP_MKNOD","CAP_NET_RAW","CAP_SETGID","CAP_SETUID","CAP_SETFCAP","CAP_SETPCAP","CAP_NET_BIND_SERVICE","CAP_SYS_CHROOT","CAP_KILL","CAP_AUDIT_WRITE"],"permitted":["CAP_CHOWN","CAP_DAC_OVERRIDE","CAP_FSETID","CAP_FOWNER","CAP_MKNOD","CAP_NET_RAW","CAP_SETGID","CAP_SETUID","CAP_SETFCAP","CAP_SETPCAP","CAP_NET_BIND_SERVICE","CAP_SYS_CHROOT","CAP_KILL","CAP_AUDIT_WRITE"]}},"root":{"path":"rootfs"},"hostname":"bdd2ed406d42","mounts":[{"destination":"/proc","type":"proc","source":"proc","options":["nosuid","noexec","nodev"]},{"destination":"/dev","type":"tmpfs","source":"tmpfs","options":["nosuid","strictatime","mode=755","size=65536k"]},{"destination":"/dev/pts","type":"devpts","source":"devpts","options":["nosuid","noexec","newinstance","ptmxmode=0666","mode=0620","gid=5"]},{"destination":"/sys","type":"sysfs","source":"sysfs","options":["nosuid","noexec","nodev","ro"]},{"destination":"/sys/fs/cgroup","type":"cgroup","source":"cgroup","options":["ro","nosuid","noexec","nodev"]},{"destination":"/dev/mqueue","type":"mqueue","source":"mqueue","options":["nosuid","noexec","nodev"]},{"destination":"/dev/shm","type":"tmpfs","source":"shm","options":["nosuid","noexec","nodev","mode=1777"]}],"linux":{"resources":{},"namespaces":[{"type":"mount"},{"type":"network"},{"type":"uts"},{"type":"pid"},{"type":"ipc"}],"maskedPaths":["/proc/asound","/proc/acpi","/proc/kcore","/proc/keys","/proc/latency_stats","/proc/timer_list","/proc/timer_stats","/proc/sched_debug","/proc/scsi","/sys/firmware"],"readonlyPaths":["/proc/bus","/proc/fs","/proc/irq","/proc/sys","/proc/sysrq-trigger"]},"windows":{"layerFolders":["C:\\ProgramData\\Docker\\lcow\\ef134f2d5748c591bf21cc2b407c49dd9be012dad5d15052bab87fc00b96444f","C:\\ProgramData\\Docker\\lcow\\4712bcdc17711399918c44b2352c5585457db6b14285cc6b2d6b630ef4ced551","C:\\ProgramData\\Docker\\lcow\\970a55c64e9bb9d56007e940a6ac94de463a7ad4b602f2d829f21c29b92e5369","C:\\ProgramData\\Docker\\lcow\\79eeaef19460e004253147fa7b109664492516495d6c7d63b8631112be468f7d","C:\\ProgramData\\Docker\\lcow\\bdd2ed406d421f00c963190cc975e5bf5f1f22b9c3536af687870257968b1fc4"],"hyperv":{},"network":{"endpointList":["C19D44B9-33F9-470A-8EC8-5C9283CE25FE"],"allowUnqualifiedDNSQuery":true}}}}.
Thanks
Angshuman
Update Sept. 2021, from issue
The issue should be resolved now. The CBFS Connect developers mention a fix in v20.0.7921, released on September 8, 2021.
Software will need to update their CBFS Connect driver, though.
This seems to be followed by microsoft/hcsshim issue 624
Windows just did an update and laid down a new copy of this driver.
Rename the C:\Windows\System32\drivers\cbfs6.sys as something else (or delete it).
Remove the container.
Reboot.
That in turn refers to docker/for-win/issue 3884
Awesome guys at nsoftware.com just fixed the issue with their SFTP Drive v2.
Indeed the problem was in cbfs driver. New version is working as expected and doesn't collide with Docker.
But microsoft/hcsshim issue 790 also mentions the same error:
The issue is present in Docker Desktop CE for windows 2.2.0.4 & 2.2.0.5
A downgrade to 2.2.0.3 resolved the issue.
If you want to "run containers natively on Windows", the next page mentions images like mcr.microsoft.com/windows/nanoserver:1903
An Ubuntu image would not work in this mode, only in the Linux Container mode.
To summarize (before Sept. 2021):
Downgrade Docker Desktop to 2.2.0.3
Reboot machine (don't forget)
Delete all previously created containers / images (if any)
docker run -it ubuntu - (for some reason , shows the bash shell & then, goes out of interactive mode)
Run docker run -it ubuntu again - now, goes into interactive mode now (2nd time) and stays
This works !
Related
failed to shutdown container in docker:
when im trying to build an image with command docker build im getting this error im using windows docker desktop The command '/bin/sh -c yarn install --production' returned a non-zero code: 4294967295: failed to shutdown container: container 1842716825b498d7be9ed514a4839dfc528caafe8f906018c93842517f60635e encountered an error during hcsshim::System::waitBackground: failure in a Windows system call: The virtual machine or container with the specified identifier is not running. (0xc0370110): subsequent terminate failed container 1842716825b498d7be9ed514a4839dfc528caafe8f906018c93842517f60635e encountered an error during hcsshim::System::waitBackground: failure in a Windows system call: The virtual machine or container with the specified identifier is not running. (0xc0370110) how this error be resolved
This must be due to windows host failure on docker call when try to shut down the container Try by restarting docker demon sudo service docker restart Check the status of the Docker containers: docker ps -a stop and remove it: docker stop <container-id> docker rm <container-id> Then try by building the image again. If the problem still persists, consider upgrading to the latest version of Docker or clear docker cache or docker system prune
Error "readlink /var/lib/docker/overlay2/l: invalid argument"
I'm getting this error when executing docker run --rm -it alpine /bin/sh: latest: Pulling from library/alpine 8921db27df28: Already exists Digest: sha256:f271e74b17ced29b915d351685fd4644785c6d1559dd1f2d4189a5e851ef753a Status: Downloaded newer image for alpine:latest ERRO[0040] error waiting for container: context canceled docker: Error response from daemon: Failed to inspect container 9919d1156d3960b46bca915bdf3b1d2320f463edbea5c39cacdc8b29640534fe: Error response from daemon: readlink /var/lib/docker/overlay2/l: invalid argument. I'm using Docker Desktop on Windows with WSL 2. I've tried docker rmi alpine:latest, but the error persisted. I've tried docker system prune --all, but it didn't help.
Some of workarounds I've used: When using the Docker command line, I specified a different version of the image. Instead of alpine:latest, I used alpine:3.16, and it helped. I used Hyper-V instead of WSL 2 (Docker Desktop → Settings → General. Untick "Use the WSL 2 based engine") As suggested in this answer, I reset Docker WSL 2 data. But instead of resetting all Docker data, it is possible to clear only WSL 2: Docker Desktop → Troubleshoot (it is the "bug" icon next to the Settings icon) → Clean/Purge data, select WSL 2, and press Delete.
Docker Windows and Linux Containers Simultaneously
How Docker Windows and Linux Containers run Simultaneously (how does it works) and why building doesn't work. I try to run mixed windows and linux containers using docker compose. I followed this article and its worked (using compose version 2.4 and latest docker desktop). Can someone explain me how does it work? Does it work only with wsl or I can use it using linux hyperv? When I try to build new linux image (pulling works fine) I got an error, some commands gave me Invalid signal: WINCH and some gave me returned a non-zero code: 4294967295: failed to shutdown container: container ad12191abf0849d5e49bb5dc0570d6ba8eaf2cc5b4e7d77127ed381901fcb672 encountered an error during hcsshim::System::waitBackground: failure in a Windows system call: The virtual machine or container with the specified identifier is not running. (0xc0370110): subsequent terminate failed container ad12191abf0849d5e49bb5dc0570d6ba8eaf2cc5b4e7d77127ed381901fcb672 encountered an error during hcsshim::System::waitBackground: failure in a Windows system call: The virtual machine or container with the specified identifier Someone solved it?
docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed:
docker run --gpus all -it -v ~/Desktop:/Desktop --ipc=host sangkny/darknet:yolov4 /bin/bash When I send this command, I get the following error: docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error running hook #0: error running hook: exit status 1, stdout: , stderr: nvidia-container-cli: initialization error: load library failed: libnvidia-ml.so.1: cannot open shared object file: no such file or directory: unknown. ERRO[0000] error waiting for container: context canceled here is my setup: Windows 10 PRO Ubuntu 18.04LTS subsystem in WSL2 mode Docker for desktop v20.10.16 I've tried everything I can with googling, but it hasn't been resolved yet. I'd appreciate it if anyone could give me advice.
Faced the same problem. After some hours of Googling eventually I've found a solution - Windows overdue update to version 21H2. I came up with that idea after reading Microsoft Docs: Starting with Windows 10 version 21H2, the Windows Subsystem for Linux has full graphics processing unit (GPU) compute support. Such a pity I lost so much time on it... Hope it helps.
My docker-compose up is no longer working and cannot start mariadb
I started using a mac and use docker to develop my sites. Until 12 ago my projects were running properly. The last activity I tried to on the machine was to install brew mysql, which I already removed. After I restarted my machine, I noticed that I can no longer start any docker container and view a project. I cd into my project folder and run docker-compose up The following error shows up: Sydney-de-Sousas-Mac:scottishleader.co.za sidney$ docker-compose up Starting scottishleader_mariadb ... error ERROR: for scottishleader_mariadb Cannot start service mariadb: driver failed programming external connectivity on endpoint scottishleader_mariadb (30a2e258468e8840ca5e67a535835603770afadab58b3e460e624ae3ba587293): Error starting userland proxy: /forwards/expose/port returned unexpected status: 500 ERROR: for mariadb Cannot start service mariadb: driver failed programming external connectivity on endpoint scottishleader_mariadb (30a2e258468e8840ca5e67a535835603770afadab58b3e460e624ae3ba587293): Error starting userland proxy: /forwards/expose/port returned unexpected status: 500 ERROR: Encountered errors while bringing up the project. Sydney-de-Sousas-Mac:scottishleader.co.za sidney$ I run docker ps and no container is listed Sydney-de-Sousas-Mac:scottishleader.co.za sidney$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES Why can I suddenly not start the container?