Skip to content

[Bug]: -v with a symlink to a Unix socket fails (errno 95) #2553

Open

Description

@SVilgelm

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 (1.7.1; main has the same check)

Steps to reproduce

# /var/run/docker.sock is a symlink on Macs with Docker Desktop or OrbStack
container run --rm -v /var/run/docker.sock:/var/run/docker.sock alpine ls -l /var/run/docker.sock

Problem description

The container fails to start with mount failed with errno 95: failed initial mount source=/run/virtiofs/<id>/docker.sock .... The socket's real path works.

Filesystem.isSocket() in RuntimeService uses File.info, which calls lstat, so a symlink to a socket is shared over virtiofs instead of relayed. The --mount check in #2541 has the same gap; I can fix both by following the symlink.

Environment

- OS: macOS 27.2.1 (26B131)
- Xcode: n/a (signed release pkg)
- Container: 1.7.1 (a15b460)

Code of Conduct

  • I agree to follow this project's Code of Conduct
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions