Skip to content

[Bug]: Can't mount a host socket when the mount target goes through a symlink. #256

@jglogan

Description

@jglogan

I have done the following

  • I have searched the existing issues
  • If possible, I've reproduced the issue using the 'main' branch of this project

Steps to reproduce

% ls ${SSH_AUTH_SOCK}
/private/tmp/com.apple.launchd.qylZi0PDA7/Listeners

% container run -it --rm --volume "${SSH_AUTH_SOCK}:/var/run/ssh-auth.sock" --env SSH_AUTH_SOCK=/var/run/ssh-auth.sock ubuntu:latest bash
root@3c3908f9-a1de-4ac5-9f36-6f8bf194dab1:/# ls ${SSH_AUTH_SOCK}
ls: cannot access '/var/run/ssh-auth.sock': No such file or directory
root@3c3908f9-a1de-4ac5-9f36-6f8bf194dab1:/#

Current behavior

Mounted socket is inaccessible.

Expected behavior

% container run -it --rm --volume "$(realpath ${SSH_AUTH_SOCK}):/run/ssh-auth.sock" --env SSH_AUTH_SOCK=/var/run/ssh-auth.sock ubuntu:latest bash 
root@9a626d00-d1ce-4f03-ae17-6784c07dd8b8:/# ls ${SSH_AUTH_SOCK}
/var/run/ssh-auth.sock

The this particular case, ssh-add -l should work properly, as should git clone via ssh.

Environment

- OS: macOS 26 developer preview
- Swift: Apple Swift version 6.2
- Xcode: Xcode 26 beta

Relevant log output

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions