Skip to content

[Bug]: --mount type=bind rejects a Unix socket source that -v accepts #2531

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 (reproduced on the 1.7.1 release)

Steps to reproduce

SOCK=/path/to/docker.sock   # any host Unix socket
container run --rm -v "$SOCK":/var/run/docker.sock docker:cli docker version          # works
container run --rm --mount type=bind,source="$SOCK",target=/var/run/docker.sock docker:cli docker version

Problem description

The --mount form fails with Error: path '<socket>' is not a directory; the -v form relays the socket and works. Both should accept a socket source, since --mount type=bind is what Docker-compatible tooling generates.

Reproduced on Apple M1 and M4 Pro.

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

Activity

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