Comments (4)
Huh, I just tried the following and it works!
$ docker run \
--rm \
--volume /var/run/docker.sock:/var/run/docker.sock \
docker version
Client:
Version: 27.1.1
API version: 1.46
Go version: go1.21.12
Git commit: 6312585
Built: Tue Jul 23 19:55:52 2024
OS/Arch: linux/arm64
Context: default
Server: Docker Desktop 4.33.0 (160616)
Engine:
Version: 27.1.1
API version: 1.46 (minimum version 1.24)
Go version: go1.21.12
Git commit: cc13f95
Built: Tue Jul 23 19:57:14 2024
OS/Arch: linux/arm64
Experimental: false
containerd:
Version: 1.7.19
GitCommit: 2bf793ef6dc9a18e00cb12efb64355c2c9d5eb41
runc:
Version: 1.7.19
GitCommit: v1.1.13-0-g58aa920
docker-init:
Version: 0.19.0
GitCommit: de40ad0
Then, I checked the Docker on Mac VM and sure enough, that's the docker socket inside the Linux VM.
from for-mac.
Yes, I think this is the expected behavior; bind mounts happen from the host where the daemon runs (on desktop, that's inside the VM); the socket on the host is a proxy for that socket, and also handles various conversions (host paths to vm paths etc), so to access the daemon socket, using the standard (/var/run/docker.sock) path should be the way to go
from for-mac.
@thaJeztah Sure, but then, how come I can bind mount e.g. a folder in my home directory? or any other path in Mac, for that matter? It's because /
is mounted in /host_mnt/
inside the VM, correct? If so, that's why I would expect mounting the "outside socket" to work. Is there something else that's failing here?
from for-mac.
@thaJeztah is there a way to "run docker context list
in the Docker VM"? For example, if I want to script getting the path to the socket in the VM, I can do this in e.g. Lima:
DOCKER_CONTEXT_VM="$(limactl shell "$VM_NAME" docker context show)"
DOCKER_HOST_VM="$(limactl shell "$VM_NAME" \
docker context inspect --format "{{.Endpoints.docker.Host}}" "$DOCKER_CONTEXT_VM"
)"
Can I do something like that in the Docker VM? All I've found so far is "Getting a Shell in the Docker Desktop Mac VM" but I can't run docker context
(or any docker
command) in that shell.
Thanks!
from for-mac.
Related Issues (20)
- Validation Error following instructions for Docker Build Secrets HOT 1
- Docker pull --platform linux/amd64 silently falls back to linux/arm64 when building on macOS
- Error when enabling IPv6 support: /fixed-cidr-v6 must match format "ipv6"
- `/var/run/docker.sock` doesn't get generated on Docker Desktop startup
- The file does not exist error in Compose File Viewer after update to 4.33.0 HOT 1
- Docker 4.33 AWS Lambda incompatibility with invocation HOT 2
- "Docker is damaged and can't be opened" error and Gatekeeper blocking Docker.app HOT 1
- Container File Explorer Expansions Don't Open HOT 1
- Linux kernel v6.10 crash on virtualization.framework
- Docker Desktop Crashes Frequently
- After upgrading to 4.33.0 (160616), now crashes with "process terminated unexpectedly: accepting AF_VSOCK connection: AF_VSOCK listener closed" HOT 8
- Mac M3 Sonoma 14.6.1 - MSSQL Error Exited (139) HOT 1
- Every 5-7 days Docker throws the following error and the engine + container all become unresponsive: "running engine: engine linux/virtualization-framework failed to run: running VM: com.docker.virtualization: process terminated unexpectedly: accepting AF_VSOCK connection: AF_VSOCK listener closed" HOT 1
- fatal error reported: Linux kernel v6.10 crash on virtualization.framework HOT 4
- Can't put a checkmark in this checkbox HOT 1
- Not allowed to launch 'docker-desktop://auth0/complete-login?code=***&state=***' because a user gesture is required. HOT 1
- docker has stopped running
- Error `pull access denied` on `docker buildx imagetools inspect`
- Host networking has been disabled because you are not signed in. Please sign in to enable it. HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from for-mac.