Skip to content

Document special behavior when bind-mounting docker socket? #20143

Open
@vpsx

Description

@vpsx

Is this a docs issue?

  • My issue is about the documentation content or website

Type of issue

I can't find what I'm looking for

Description

(After much experimentation, it seems to me that) when running Docker Desktop for Linux, and not Engine,
the -v flag when passed /var/run/docker.sock for the host machine filepath will mount /var/run/docker.sock from the VM;
whereas in all other cases, the host machine filepath is interpreted as a path on... the host machine filesystem.

This is confusing in general, but especially if someone reads somewhere that one can "bind mount the docker socket",
observes that there is no /var/run/docker.sock on their host,
does docker context list and see that they are talking to /home/xxx/.docker/desktop/docker.sock,
and attempts to mount that instead.

Location

https://docs.docker.com

Suggestion

No response

Metadata

Metadata

Assignees

Labels

area/desktopIssue affects a desktop edition of Docker. E.g docker for maclifecycle/frozen

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions