markdown 在macOS上的Unix套接字共享

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown 在macOS上的Unix套接字共享相关的知识,希望对你有一定的参考价值。

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.

以上是关于markdown 在macOS上的Unix套接字共享的主要内容,如果未能解决你的问题,请参考以下文章