Hello!
The issue you’re encountering is likely due to the way bind mounts handle file permissions and attributes. When you create a Unix domain socket within a bind-mounted directory, the host filesystem might not fully support the special file types or attributes required for the socket, leading to the “Invalid argument” error.
In contrast, creating the socket directly on the container’s filesystem works because the container’s native filesystem fully supports these attributes.
To work around this, you can try creating the socket on the container’s filesystem and then move it to the bind-mounted directory, or use a named volume instead of a bind mount for better compatibility with special file types like Unix domain sockets.