sourcegraph/src-cli

batches: Docker Desktop for Linux: Invalid mount config for type "bind"

sfllaw opened this issue · 5 comments

Docker Desktop for Linux is out and looks like it has similar problems to #405.

Somehow, the underlying dockerd cannot find the -tmp directory used to unpack repositories.

This happens whether -workspace bind or -workspace volume. Running in -v mode gives the following output:

sfllaw@hostname:~$ src batch preview -v -workspace volume -f batch-change.yaml 
✅ Parsing batch spec
✅ Resolving namespace
✅ Preparing container images  █████████████████████████████████████████████████
🚧 Workspace creator: volume
✅ Set workspace type
✅ Resolved 5 repositories
✅ Found 5 workspaces with steps to execute
✅ Found 4 cached changeset specs; 1 task needs to be executed
✅ Executing... (1/1, 1 errored)  ██████████████████████████████████████████████

└── github.com/sfllaw/repo  creating workspace: preparing local g...  6s

❌ Error:
   github.com/sfllaw/repo:
   creating workspace: preparing local git repo: preparing workspace: Docker output:
   docker: Error response from daemon: invalid mount config for type "bind": bind source path does not exist: /tmp/src-run-1024304234.
   See 'docker run --help'.: exit status 125
   Log: /tmp/changeset-github.com-sfllaw-repo-service-2ee289175889fff0ee96efc10192185f8ed8c861.3212197002.log

I have since reverted to the system dockerd, which has no such problem.

Hello @sfllaw,

Thanks for reporting this issue.
We've added it to our planning discussion list and we will respond after.

Cheers!

@sfllaw What distro (and version) are you on?

sfllaw@hostname:~$ lsb_release -d
Description:	Ubuntu 22.04 LTS

sfllaw@hostname:~$ apt show docker-desktop
Package: docker-desktop
Version: 4.8.2-79419

This is almost certainly caused because the Docker Desktop for Linux has protected bind paths, just like it does on other platforms.

(For whoever ends up fixing this:) Relevant Docker Desktop for Linux docs: https://docs.docker.com/desktop/linux/#file-sharing