mac下開啓docker API遠程調用

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
  • 經過包安裝 (推薦)

Centosdocker

1
$ yum install -y socat

Debian/Ubuntuspa

1
$ apt-get install -y socat

macOSget

1
$ brew install socat

Socat 基本語法

1
socat [options] <address> <address>

 

```源碼

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

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

```語法

相關文章
相關標籤/搜索