Docker - failed to mount local volume, no such file or directory
Asked Answered
P

0

9

I have a docker-compose that was working for a long time and suddenly stopped. I am getting: failed to mount local volume, no such file or directory

This was working for months and started giving the error a few weeks ago. The docker-compose is in source control and I can see that it hasn't changed. I started getting it on a new machine and shortly after I started getting it on my existing box. I suspect it's a secruity or policy setting that was pushed. I tried installing an old version of docker desktop but still get the error.

Here is the command and complete error:

 docker-compose  up -d
[+] Running 0/1
 - Container dockertest_testimage_1  Starting                                                                      1.1s
Error response from daemon: error while mounting volume '/var/lib/docker/volumes/dockertest_testLoc/_data': failed to mount local volume: mount testimage:/var/lib/docker/volumes/dockertest_testLoc/_data, flags: 0x1000: no such file or directory

Here is a test verison of the compose that gives the same error.

version: '3.9'
services:
  testimage:
    image: ubuntu  
    volumes:       
      - testLoc:/var/opt/testing
volumes:
  testLoc:
    driver: local
    driver_opts: 
      type: "none"
      o: "bind"
      device: "./testimage"

Version:

Docker version 20.10.11, build dea9396
OS Name:                   Microsoft Windows 10 Enterprise
OS Version:                10.0.19044 N/A Build 19044

Any advice? How can I get more detailed logging?

Philibeg answered 11/1, 2022 at 17:41 Comment(2)
Try updating your docker-compose to the latest versionVioloncello
That was supposed to be fixed by github.com/compose-spec/compose-go/pull/332. Is that still happening?Mundell

© 2022 - 2024 — McMap. All rights reserved.