Sponsored Content
Top Forums UNIX for Advanced & Expert Users Re: [docker/for-mac] Support for sharing UNIX sockets (#483) Post 303046290 by Neo on Thursday 30th of April 2020 12:15:30 AM
Old 04-30-2020
Re: [docker/for-mac] Support for sharing UNIX sockets (#483)

There now exists an official workaround for this as of Docker for Mac >= 2.2.0.0.

REF: File system sharing (osxfs) | Docker Documentation

The solution involves using a "magic path" specifically for SSH_AUTH_SOCK: /run/host-services/ssh-auth.sock

Mount this special path into the container via docker run args:

Code:
SSH_AUTH_SOCK_MAGIC_PATH='/run/host-services/ssh-auth.sock'
docker run -ti -v ${SSH_AUTH_SOCK_MAGIC_PATH}:${SSH_AUTH_SOCK_MAGIC_PATH} \
           -e SSH_AUTH_SOCK=${SSH_AUTH_SOCK_MAGIC_PATH} \
           some-container/needing-ssh-agent

Note that this does not resolve the main issue of mounting arbitrary Unix sockets into a container. At least it works for ssh-agent / SSH_AUTH_SOCK!

So, this fix does not help when setting up a reverse web proxy to a Unix socket in the container (as mentioned above).


See also: Support for sharing unix sockets . Issue #483 . docker/for-mac . GitHub
 

6 More Discussions You Might Find Interesting

1. SCO

Sharing unix drives from two unix systems

I have two SCO openserver systems, 1 in the US and 1 in the UK. I am setting up a vpn to connect the two local networks that also have windows pc's on them. Is there a way that either unix system can see the hard drive on the other unix system so that I can share data between them. I run a cobol... (1 Reply)
Discussion started by: rongrout
1 Replies

2. IP Networking

sharing of IP address for load sharing avoiding virtual server & redirection machine

I have RedHat 9.0 installed on three of my servers (PIII - 233MHz) and want that they share a common IP address so that any request made reaches each of the servers. Can anyone suggest how should I setup my LAN. I'm new to networking in Linux so please elaborate and would be thankful for a timely... (2 Replies)
Discussion started by: Rakesh Ranjan
2 Replies

3. UNIX for Advanced & Expert Users

UNIX Message Queues vs. Sockets

If I use sockets for IPC, and can easily distribute my applications. UNIX Message Queues are local to the processor. As I understand it, Message Queues still incur system call overhead, just like socket calls. What advantage does a UNIX Message Queue provide versus a TCP or UDP Socket,... (2 Replies)
Discussion started by: zen29sky
2 Replies

4. UNIX for Advanced & Expert Users

UNIX domain sockets vs FIFOs

Is there a performance advantage of one of these over the other? Obviously, it makes no sense to use normal TCP sockets or UDP sockets w/ the overhead they carry. But what about UNIX domain sockets vs FIFOs? I'd think they'd be very similar, in terms of performance and in terms of how they're... (2 Replies)
Discussion started by: mgessner
2 Replies

5. UNIX for Dummies Questions & Answers

what is the advantage of unix sockets?

Hi, i understood that there are several type of sockets: TCP, UDP & Unix. i wondered, what is the performance advantages of unix socket of the other types? isn't it equal to use UDP with localhost as destination over unix socket? Thanks in advance, Sariel (1 Reply)
Discussion started by: sarielz
1 Replies

6. UNIX for Dummies Questions & Answers

Screen Sharing VNC Mac

Hello, I am having some trouble using screen sharing with my Mac. There is a Mac Pro in the lab at my school, and I need to access it via screen sharing from my Macbook Pro from home. Each has Lion. The screen sharing works when I am in the lab and the Mac Pro is on the WiFi network, it also works... (1 Reply)
Discussion started by: Tyler_92
1 Replies
SOCKSTAT(1)						    BSD General Commands Manual 					       SOCKSTAT(1)

NAME
sockstat -- list open sockets SYNOPSIS
sockstat [-46clnu] [-f address_family] [-p ports] DESCRIPTION
The sockstat command lists open Internet or UNIX domain sockets. The following options are available: -4 Show AF_INET (IPv4) sockets. -6 Show AF_INET6 (IPv6) sockets. -c Show connected sockets. -f address_family Limit listed sockets to those of the specified address_family. The following address families are recognized: inet, for AF_INET; inet6, for AF_INET6; and local or unix, for AF_LOCAL. -l Show listening sockets. -n Numeric output only. No attempt will be made to look up symbolic names for addresses and ports. -p ports Only show Internet sockets if either the local or foreign port number is on the specified list. The ports argument is a comma- separated list of port numbers and ranges specified as first and last port separated by a dash. -u Show AF_LOCAL (UNIX) sockets. If neither -4, -6, nor -u are specified, sockstat will list sockets in all three domains. If neither -c nor -l are specified, sockstat will list both listening and connected sockets, as well as those sockets that are in neither state. The information listed for each socket is: USER The user who owns the socket. COMMAND The command which holds the socket. PID The process ID of the command which holds the socket. FD The file descriptor number of the socket. PROTO The transport protocol associated with the socket for Internet sockets, or the type of socket (stream, seqpacket or data- gram) for UNIX sockets. LOCAL ADDRESS For Internet sockets, this is the address to which the local end of the socket is bound (see getsockname(2)). For bound UNIX sockets, it is the socket's filename or ``-''. FOREIGN ADDRESS The address to which the foreign end of the socket is bound (see getpeername(2)) or ``-'' for unconnected UNIX sockets. SEE ALSO
fstat(1), netstat(1), inet(4), inet6(4), unix(4) HISTORY
The sockstat command appeared in FreeBSD 3.1. It was then rewritten for NetBSD 3.0. AUTHORS
This version of the sockstat command was written by Andrew Brown <atatat@NetBSD.org>. This manual page was written by Dag-Erling Smorgrav <des@FreeBSD.org> and was adapted to match the NetBSD implementation by Andrew Brown <atatat@NetBSD.org>. BSD
July 14, 2006 BSD
All times are GMT -4. The time now is 07:12 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy