In case you don't want to / can't use socat...
Following up on @Mange 's workaround here is a solution without using socat, only pure netcat:
On the host:
```
mkfifo myfifo
nc -lk 12345 <myfifo | nc -U $SSH_AUTH_SOCK >myfifo
```
On the container:
```
mkfifo myfifo
while true; do
nc docker.for.mac.localhost 12345 <myfifo | nc -Ul /tmp/ssh-agent.sock >myfifo
done &
export SSH_AUTH_SOCK=/tmp/ssh-agent.sock
```
ssh ...
This bypasses the socket connection over tcp. Since it is netcat only you have to re-establish the connection manually after the pipe has disconnected.