My docker-compose up is no longer working and cannot start mariadb - macos

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?

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

Failed to create kubernetes pod on a windows server 2019 node

I set up a master node on a Ubuntu 18.04 machine and followed the guide: https://kubernetes.io/ja/docs/setup/production-environment/windows/user-guide-windows-nodes/ to register a windows server 2019 node to the cluster successfully.
Now the kubelet has been started on powershell and the two nodes are ready.
On the windows machine, I run the command line: "kubectl create deployment --image=XXX(A windows server 2019 image) webadmin-app" to create a deployment on the windows node.
When creating the pod, kubelet reports the following log messages:
W0821 17:37:03.003768 99524 pod_container_deletor.go:77] Container "dee4daa76a9e60e0e68af75597092aa5cff517c7021a6ef7579f77f662f2a163" not found in pod's containers
W0821 17:37:03.071774 99524 helpers.go:289] Unable to create pod sandbox due to conflict. Attempting to remove sandbox "dee4daa76a9e60e0e68af75597092aa5cff517c7021a6ef7579f77f662f2a163"
E0821 17:37:03.108764 99524 remote_runtime.go:200] CreateContainer in sandbox "62ff282461eba2fae24a66b7d38ccca43b224c74320dbb5a0a4659b4c4446eb7" from runtime service failed: rpc error: code = Unknown desc = Error response from daemon: Conflict. The container name "/k8s_webadmin-site_webadmin-app-757c7455cf-nms75_default_7ac60567-f9e2-4c04-aead-c6957200c961_0" is already in use by container "dee4daa76a9e60e0e68af75597092aa5cff517c7021a6ef7579f77f662f2a163". You have to remove (or rename) that container to be able to reuse that name.
E0821 17:37:03.109762 99524 kuberuntime_manager.go:801] container start failed: CreateContainerError: Error response from daemon: Conflict. The container name "/k8s_webadmin-site_webadmin-app-757c7455cf-nms75_default_7ac60567-f9e2-4c04-aead-c6957200c961_0" is already in use by container "dee4daa76a9e60e0e68af75597092aa5cff517c7021a6ef7579f77f662f2a163". You have to remove (or rename) that container to be able to reuse that name.
E0821 17:37:03.113766 99524 pod_workers.go:191] Error syncing pod 7ac60567-f9e2-4c04-aead-c6957200c961 ("webadmin-app-757c7455cf-nms75_default(7ac60567-f9e2-4c04-aead-c6957200c961)"), skipping: failed to "StartContainer" for "webadmin-site" with CreateContainerError: "Error response from daemon: Conflict. The container name "/k8s_webadmin-site_webadmin-app-757c7455cf-nms75_default_7ac60567-f9e2-4c04-aead-c6957200c961_0" is already in use by container "dee4daa76a9e60e0e68af75597092aa5cff517c7021a6ef7579f77f662f2a163". You have to remove (or rename) that container to be able to reuse that name."
Such failed messages keeps generating when creating the pod.
So I listed the docker containers using "docker ps" during the pod creation period. It seems that the kubelet keeps creating and removing containers(which are based on the specified image XXX).
How can I resolve such failure to create a deployment on the windows node?
Update:
I can create a deployment if --image is set to mcr.microsoft.com/k8s/core/pause:1.2.0 .
However if I use another image which is based on windows nano server. I got the deployment failed.
I caught up some error logs from kubelet output:
W0826 17:58:14.903662 127340 cri_stats_provider_windows.go:89] Failed to get HNS endpoint "" with error 'json: cannot unmarshal array into Go value of type hns.HNSEndpoint', continue to get stats for other endpoints
E0826 17:58:14.940665 127340 cni.go:364] Error adding default_webadmin-app-757c7455cf-5c5nf/9a37dab965d1b006c4c2ec70619b3a4bb42dd39dad8c0ce1baf39eab634da3d5 to network flannel/vxlan0: error while ProvisionEndpoint(9a37dab965d1b006c4c2ec70619b3a4bb42dd39dad8c0ce1baf39eab634da3d5_vxlan0,39EA65C2-C0F9-4870-8B7A-E2A1DBF5CD9D,9a37dab965d1b006c4c2ec70619b3a4bb42dd39dad8c0ce1baf39eab634da3d5): The virtual machine or container was forcefully exited.
E0826 17:58:14.942663 127340 cni_windows.go:59] error while adding to cni network: error while ProvisionEndpoint(9a37dab965d1b006c4c2ec70619b3a4bb42dd39dad8c0ce1baf39eab634da3d5_vxlan0,39EA65C2-C0F9-4870-8B7A-E2A1DBF5CD9D,9a37dab965d1b006c4c2ec70619b3a4bb42dd39dad8c0ce1baf39eab634da3d5): The virtual machine or container was forcefully exited.
W0826 17:58:14.943663 127340 docker_sandbox.go:400] failed to read pod IP from plugin/docker: networkPlugin cni failed on the status hook for pod "webadmin-app-757c7455cf-5c5nf_default": error while ProvisionEndpoint(9a37dab965d1b006c4c2ec70619b3a4bb42dd39dad8c0ce1baf39eab634da3d5_vxlan0,39EA65C2-C0F9-4870-8B7A-E2A1DBF5CD9D,9a37dab965d1b006c4c2ec70619b3a4bb42dd39dad8c0ce1baf39eab634da3d5): The virtual machine or container was forcefully exited.
From the error messages, it seems that it is the container's image that caused the pod's failure. Did I miss anything when I was setting up my own image? Why the network plugin failed to work for my created image but works for the image mcr.microsoft.com/k8s/core/pause:1.2.0 ?

Docker pull fails on Windows 10 in Windows Container mode

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 !

Docker Compose failed to build - Filesharing has been cancelled

I've ran into an issue with Docker Desktop, currently im running the edge version as a user on Stackoverflow. Before I got the drive not shared for unknown reason error which was "solved" by installing edge version: Docker for Windows: Drive sharing failed for an unknown reason
Now that this was installed im getting this new error which prevents some containers from being built. These containers have all been tested and works on several other systems. Currently 3 out of 4 containers are not built and they all produce the same error as below:
ERROR: for db Cannot create container for service db: status code not OK but 500: {"Message":"Unhandled exception: Filesharing has been cancelled"}
Encountered errors while bringing up the project.
full error:
Creating imt2291-part2_www_1 ...
Creating imt2291-part2_phpmyadmin_1 ... done
Creating imt2291-part2_db_1 ...
Creating imt2291-part2_test_1 ... error
Creating imt2291-part2_www_1 ... error
ERROR: for imt2291-part2_test_1 Cannot create container for service test: status code not OK but 500: {"Message":"Unhandled exception: Filesharing has been cancelled"}
ERROR: for imt2291-part2_www_1 Cannot create container for service www: status Creating imt2291-part2_db_1 ... error
lled"}
ERROR: for imt2291-part2_db_1 Cannot create container for service db: status code not OK but 500: {"Message":"Unhandled exception: Filesharing has been cancelled"}
ERROR: for test Cannot create container for service test: status code not OK but 500: {"Message":"Unhandled exception: Filesharing has been cancelled"}
ERROR: for www Cannot create container for service www: status code not OK but 500: {"Message":"Unhandled exception: Filesharing has been cancelled"}
ERROR: for db Cannot create container for service db: status code not OK but 500: {"Message":"Unhandled exception: Filesharing has been cancelled"}
Encountered errors while bringing up the project.
Has anyone encountered this issue before and found a fix?
You need to update File Sharing configuration in your Docker for Windows app (there is a new security hardening in 2.2.0.0 which has agressive defaults). Add all folders you need and then restart Docker for Windows.
After changing "File Sharing" to C Drive its start working in my windows machine. I am using docker desktop 2.3.0.3
I am using Docker in Windows 10 and had the same problem.
The solution suggested by Oleg Nenashev and Rejoanul Alam helped me.
Adding the project dir where the Dockerfile lives or C:/ to docker shared folders solves the problem.
Step 6 from Getting started states:
Shared folders, volumes, and bind mounts
If your project is outside of the Users directory (cd ~), then you need to share the drive or location of the Dockerfile and volume you are using.
If you get runtime errors indicating an application file is not found, a volume mount is denied, or a service cannot start, try enabling file or drive sharing.
Volume mounting requires shared drives for projects that live outside of C:\Users (Windows) or /Users (Mac), and is required for any project on Docker Desktop for Windows that uses Linux containers.
For more information, see File sharing on Docker for Mac, and the general examples on how to Manage data in containers.
If you are using Oracle VirtualBox on an older Windows OS, you might encounter an issue with shared folders as described in this VB trouble ticket. Newer Windows systems meet the requirements for Docker Desktop for Windows and do not need VirtualBox.
I have meet this problem and my environment is windows. first when the issue happen, I chance the file sharing path to C: , and my project path is in G: ,so the command docker-compose up fail,and the massage is:
docker: Error response from daemon: status code not OK but 500 {"Message":"Unhandled exception: Filesharing has been cancelled"}
I think the file sharing must include your project path. because when I set my file sharing path in other file path , it doesn't work, however, i chance it to the path where is my project path, docker-compose up do successfully!
I had the same error and answers of Oleg Nenashev and Rejoanul Alam helped me to solve this error.
My task was to share volumes between containers.
I have a website folder with file index.html inside:
Open Docker Desktop Settings and write the address of the folder you are working with in File Sharing:
After this open this folder in your command prompt and add the necessary Docker command:
If the command is correct and you did all steps attentively it must be working fine.

ddev nfs mount fails on win10

I get the following Error when trying to get ddev running with nfs-mounts on win10
ERROR: for web Cannot start service web: error while
mounting volume '/var/lib/docker/volumes/ddev-drupal8_nfsmount/_data': error while
mounting volume with options:
type='nfs' device=':/D/seu/source/drupal8prototyp_' o='addr=host.docker.internal,hard,
nolock,rw': connection refused
I have checked the Windows Defender FW and added the following lines to the nfs_exports.txt file
Any hints on that topic?

Resources