Docker Cheatsheet

Contents

Docker socket

Communicating between containers is possible by talking to the docker server via the socket on the host

echo -e "GET /info HTTP/1.0\r\n" | nc -U /var/run/docker.sock
HTTP/1.0 200 OK
Content-Type: application/json
Server: Docker/1.9.1 (linux)
Date: Thu, 17 Mar 2016 15:54:57 GMT
Content-Length: 1444

{
    "ID":"VUTL:QKSZ:5RYC:W33H:4EAT:7ECE:TQ47:3H56:GCJY:3GJW:RPFX:5CCN",
    "Containers":13,
    "Images":104,
    "Driver":"aufs",
    "DriverStatus"
...
}
comments powered by Disqus