Skip to content

Instantly share code, notes, and snippets.

@slopjong
Created September 6, 2014 10:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save slopjong/57589360760efb0ade87 to your computer and use it in GitHub Desktop.
Save slopjong/57589360760efb0ade87 to your computer and use it in GitHub Desktop.

Docker

Create: Request

POST /v1.14/containers/create HTTP/1.1
Host: 127.0.0.1:9999
User-Agent: Docker-Client/1.2.0
Content-Length: 377
Content-Type: application/json
Accept-Encoding: gzip

{"Hostname":"","Domainname":"","User":"","Memory":0,"MemorySwap":0,"CpuShares":0,"Cpuset":"","AttachStdin":false,"AttachStdout":true,"AttachStderr":true,"PortSpecs":null,"ExposedPorts":{},"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":[],"Cmd":["ls"],"Image":"slopjong/apache:latest","Volumes":{},"WorkingDir":"","Entrypoint":null,"NetworkDisabled":false,"OnBuild":null}

Create: Response

HTTP/1.1 201 Created
Content-Type: application/json
Date: Sat, 06 Sep 2014 09:59:36 GMT
Content-Length: 90

{"Id":"6ec943a95a23219bfc6e5aecf2b61d3134059be36eeb2db676d14ba06f8d0d5c","Warnings":null}

Attach: Request

POST /v1.14/containers/6ec943a95a23219bfc6e5aecf2b61d3134059be36eeb2db676d14ba06f8d0d5c/attach?stderr=1&stdout=1&stream=1 HTTP/1.1
Host: 127.0.0.1:9999
User-Agent: Docker-Client/1.2.0
Content-Length: 0
Content-Type: plain/text

Attach: Response

HTTP/1.1 200 OK
Content-Type: application/vnd.docker.raw-stream

.......]bin boot tmp usr var

Docklet

Create: Request

POST /v1.14/containers/create HTTP/1.1
Host: 127.0.0.1:9999
Connection: close
Accept-Encoding: gzip, deflate
User-Agent: Zend\Http\Client
Content-Length: 736
Content-Type: application/json

{"Hostname":"","Domainname":"","User":"","Memory":0,"MemorySwap":0,"CpuShares":0,"Cpuset":"","AttachStdin":false,"AttachStdout":true,"AttachStderr":true,"PortSpecs":null,"ExposedPorts":{},"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":[],"Cmd":["ls"],"Image":"slopjong/apache:latest","Volumes":{},"WorkingDir":"","Entrypoint":null,"NetworkDisabled":false,"OnBuild":null}

Create: Response

HTTP/1.1 201 Created
Content-Type: application/json
Date: Sat, 06 Sep 2014 10:06:39 GMT
Content-Length: 90
Connection: close

{"Id":"f5db193ee95a91ea084aab410d75398ceef03fdce5c1151a2a9b45d4965ad727","Warnings":null}

Attach: Request

POST /v1.14/containers/f5db193ee95a91ea084aab410d75398ceef03fdce5c1151a2a9b45d4965ad727/attach%3Fstderr=1&stdout=1&stream=1 HTTP/1.1
Host: 127.0.0.1:9999
Connection: close
Accept-Encoding: gzip, deflate
User-Agent: Zend\Http\Client
Content-Type: plain/text

Attach: Response

HTTP/1.1 404 Not Found
Content-Type: text/plain; charset=utf-8
Date: Sat, 06 Sep 2014 12:18:54 GMT
Content-Length: 19
Connection: close

404 page not found
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment