Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 task done
vpsx opened this issue Jun 4, 2024 · 3 comments
Open
1 task done

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

vpsx opened this issue Jun 4, 2024 · 3 comments
Assignees
Labels
area/desktop Issue affects a desktop edition of Docker. E.g docker for mac

Comments

@vpsx
Copy link

vpsx commented Jun 4, 2024

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

@vpsx vpsx added the status/triage Needs triage label Jun 4, 2024
@vpsx
Copy link
Author

vpsx commented Jun 4, 2024

Maybe one other idea might be to show a warning if the user
(1) is using Docker Desktop and
(2) tries to bind-mount a file of type socket that has a path other than /var/run/docker.sock,
since (as far as I understand/have seen) in general when using DD it is not possible to bind-mount a socket on the host. (That is, you can mount it, but then the socket will subsequently not be able to connect inside the container.)
But that is outside the scope of docs.

@aevesdocker aevesdocker added area/desktop Issue affects a desktop edition of Docker. E.g docker for mac and removed status/triage Needs triage labels Jun 6, 2024
@docker-robot
Copy link

docker-robot bot commented Oct 15, 2024

There hasn't been any activity on this issue for a long time.
If the problem is still relevant, mark the issue as fresh with a /remove-lifecycle stale comment.
If not, this issue will be closed in 14 days. This helps our maintainers focus on the active issues.

Prevent issues from auto-closing with a /lifecycle frozen comment.

/lifecycle stale

@ctalledo
Copy link
Contributor

/remove-lifecycle stale

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/desktop Issue affects a desktop edition of Docker. E.g docker for mac
Projects
None yet
Development

No branches or pull requests

3 participants