mac下开启docker API远程调用

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

Socat 安装

  • 通过源码方式安装
1
2
3
4
5
6
$ wget http://www.dest-unreach.org/socat/download/socat-1.7.3.2.tar.gz
$ tar zxf socat-1.7.3.2.tar.gz
$ cd socat-1.7.3.2
$ ./configure 
$ make   
$ make install
  • 通过包安装 (推荐)

Centos

1
$ yum install -y socat

Debian/Ubuntu

1
$ apt-get install -y socat

macOS

1
$ brew install socat

Socat 基本语法

1
socat [options] 

 

```

docker run -d -v /var/run/docker.sock:/var/run/docker.sock -p 2376:2375 \

bobrik/socat TCP4-LISTEN:2375,fork,reuseaddr UNIX-CONNECT:/var/run/docker.sock

```

 

 

 

转载于:https://my.oschina.net/u/3005325/blog/2993597

你可能感兴趣的:(mac下开启docker API远程调用)