Error mounting volume

Hi all,

I’m getting following error when docker-compose tries to mount a bind volume.

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 mounting "/run/desktop/mnt/host/wsl/docker-desktop-bind-mounts/Ubuntu/ef99c58ea9b8f89b04a2efb52782736b03f5e1cf5b6acfcbdabf6d908728981a" to rootfs at "/config": mount /run/desktop/mnt/host/wsl/docker-desktop-bind-mounts/Ubuntu/ef99c58ea9b8f89b04a2efb52782736b03f5e1cf5b6acfcbdabf6d908728981a:/config (via /proc/self/fd/14), flags: 0x5000: no such file or directory: unknown

This is the docker-compose.yml file, but I think the problem is on my host rather than in the files as the repos is correctly running on several other hosts (my host before the fact included!).

My setup:

  • Windows 10
  • Docker Desktop (v4.13.0)
  • WSL2 with Ubuntu distro

The fact: about a couple of mounths ago - for other reasons - I disabled docker-compose v2; unfortunately I don’t remember everithing I changed. :frowning:
Due to this, I’ve focused my researches aroud docker-compose v2, but I’m not sure which could be the root cause of the problem: any idea would be appreciated!

I read a lot of articles (in this forum and around the internet), I found lots of articles reporting similar errors, but never with exactly the same details: flags: 0x5000: no such file or directory: unknown.
I guess this is the key to solve my problem, but I wasn’t able to find any documentation related.

Failed attempts:

  • fixed some settings to correctly enable docker-compose v2 (following the articles I told a while ago),
  • uninstalled and reinstalled Docker Desktop
  • unregistered the docker-desktop-data and the docker-desktop WSL distros
  • added a new Debian distro to WSL.

Some cut/paste I think could be helpful.

From Docker Desktop (v4.13.0) → Settings → Docker Engine (v20.10.20).

{
  "builder": {
    "gc": {
      "defaultKeepStorage": "20GB",
      "enabled": true
    }
  },
  "experimental": false,
  "features": {
    "buildkit": true
  }
}

From DOScmd

>wsl --list --verbose
  NAME                   STATE           VERSION
* Ubuntu                 Running         2
  docker-desktop         Running         2
  Debian                 Running         2
  docker-desktop-data    Running         2

From Ubuntu (and exactly the same from Debian)

$ docker --version
Docker version 20.10.20, build 9fdeb9c
$ docker-compose --version
Docker Compose version v2.12.0

Obviously if you need some other info, just ask, I’ll be happy to provide anything which could somehow help!

Thank you very much!
iCC

Update: we (me and my team) have observed carefully the error and, in our little experience (about 15 hosts observed), we noticed:

  • in about 15 hosts only two of them have my setup (Windows 10 + Docker Desktop + WSL2);
  • exactly the same error is raised only by the two hosts with this setup;

could it be this is caused by some bug in one of the three told componenets?

Thank you

I tried it and it may be the result of one of the new features in Docker Desktop 4.13, Enhanced Container isolation even though it is for business customers

Docker’s new Hardened Docker Desktop security model for Docker Business customers,

At least this was my guess, because I don’t know much about it yet, since I don’t really have time to learn about new updates recently, but I wanted to use the method which I talked about at the last Docker Community All-Hands, which is using the following command to run a process on the Docker Desktops virtual machine, but it does not work anymore:

docker run --rm -it --net host --privileged justincormack/nsenter1

Not on Windows and not on macOS.

I could get into the VM an other way. I logged in to Docker’s WSL distribution “docker-desktop”, listed the processes, found “containerd-shim” processes and used the process ID of one of those with

nsenter --all --target <pid> bash

Then I used

ctr -n services.linuxkit task exec -t --exec-id test docker bash

to get into the container which runs the Docker daemon and I checked if the folder was there and it was there.

So I am not sure what happens but it is either a bug or we should change a setting I don’t know about yet.

Hi @rimelek ;

thank for your answer. Before commenting it let my expose a possible workaround, which at least for me, worked.

I unindtalled Docker Desktop and I installed docker directly inside the WSL2 Ubuntu following the doc.

While performing the Uninstall old versions I uninstalled some more packages; I found them with following commands:

$ apt list --installed | grep docker
$ apt list --installed | grep container
$ apt list --installed | grep runc

This has the drawback I have to manually start docker (or probably I’ve not found an easy way to automate the service startup) with sudo dockerd, but at least I’m unblocked.

Back to your answer, @rimelek ;
this seems to enforce the supposition of your conclusion: it seems the problem is in Docker Desktop, unfortunately I have not the required knowledge to understand if it is a bug or a configuration problem.

If you think there may be some command which output could be useful, please just let me know.

Thank you again,
Daniele

Yes, WSL2 is a good alternative for everyone who doesn’t need a GUI and the features of Docker Desktop like extensions.

Use

service docker start

instead so you can run it in the background.

Or if you want to use systemd, the new WSL2 supports it optionally.

I had to download the release manually since this is a preview releaae. I quote the relevant statement from the blog post:

If you are not on Windows Insiders and want to use it immediately, you can download the latest release from the WSL release page.

If I have to guess I would say it is a bug, but I can be wrong. If I can find time I will report it on GitHub

But you can do that too if you want. If you do, please, share the link of the issue here so we will not report it twice.

I have found something that is similar but this is about Kubernetes running on Docker Desktop

Hi @rimelek and thank you for your answer!

The simple service docker start is working fine ATM; thank you!

Currently I’m too busy to explore all your other suggestions; I’ll try to give you some feedbacks in the next days.

Thank you again,
Daniele