Skip to content

Support forwarding of '/var/run/docker.sock' on macOS#1361

Open
Cyberax wants to merge 1 commit intocontainers:mainfrom
Cyberax:main
Open

Support forwarding of '/var/run/docker.sock' on macOS#1361
Cyberax wants to merge 1 commit intocontainers:mainfrom
Cyberax:main

Conversation

@Cyberax
Copy link
Copy Markdown
Contributor

@Cyberax Cyberax commented Dec 23, 2025

Podman Desktop doesn't support forwarding of sockets on macOS, but with this hack we can work around it. This also brings podman-compose to parity with the regular command line.

This PR does not improve compatibility with the spec, but it improves the compatibility with raw Podman on macOS. The current behavior of Podman results in this invocation working fine:

podman run -it -v /var/run/docker.sock:/var/run/docker.sock --security-opt label=disable base sh 

However, podman-compose normalizes the socket paths, so that the equivalent Compose file doesn't work.

The change has an integration test for the macOS desktop.

@Cyberax Cyberax force-pushed the main branch 3 times, most recently from 60d4b9a to ed3f569 Compare December 24, 2025 00:07
Podman Desktop doesn't support forwarding of sockets on macOS, but with this hack we can work around it. This also brings podman-compose to parity with the regular command line. Signed-off-by: Aleksei Besogonov <b@alex.net>
@Cyberax
Copy link
Copy Markdown
Contributor Author

Cyberax commented Jan 21, 2026

Is it possible to merge this patch? It's limited in scope and should not affect other OSes.

@p12tic
Copy link
Copy Markdown
Collaborator

p12tic commented Feb 22, 2026

There's another PR fixing the same problem: #1291. Why wouldn't that approach work?

@Cyberax
Copy link
Copy Markdown
Contributor Author

Cyberax commented Feb 24, 2026

It's essentially the same approach. My PR just adds a more detailed comment about this behavior and makes it conditional for macOS.

So merging either PR is fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants