Skip to content

Instantly share code, notes, and snippets.

@eagletmt
Created June 20, 2015 12:11
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 eagletmt/29f9b948a66153fc42b0 to your computer and use it in GitHub Desktop.
Save eagletmt/29f9b948a66153fc42b0 to your computer and use it in GitHub Desktop.
POST /v1.9/containers/create HTTP/1.1
Host: /var/run/docker.sock
User-Agent: Docker-Client/0.8.0
Content-Length: 422
Content-Type: application/json
Accept-Encoding: gzip

{
    "AttachStderr": true,
    "AttachStdin": false,
    "AttachStdout": true,
    "Cmd": null,
    "CpuShares": 0,
    "Dns": null,
    "Domainname": "",
    "Entrypoint": null,
    "Env": null,
    "ExposedPorts": null,
    "Hostname": "",
    "Image": "b90903840ee15a56d8e096fd5fbc6b9f1e9439bbf9c8db073c5bb34d0cf6db3c",
    "Memory": 0,
    "MemorySwap": 0,
    "NetworkDisabled": false,
    "OpenStdin": false,
    "PortSpecs": null,
    "StdinOnce": false,
    "Tty": false,
    "User": "",
    "Volumes": {},
    "VolumesFrom": "",
    "WorkingDir": ""
}
HTTP/1.1 201 Created
Content-Type: application/json
Date: Sat, 20 Jun 2015 12:05:48 GMT
Content-Length: 90

{
    "Id": "da0815c22e183732232962b2d62e7ce1b3b3bea7fae975e394fac9b952279a77",
    "Warnings": null
}
POST /v1.9/containers/create HTTP/1.1
Host: /var/run/docker.sock
User-Agent: Docker-Client/0.8.0
Content-Length: 422
Content-Type: application/json
Accept-Encoding: gzip

{
    "AttachStderr": true,
    "AttachStdin": false,
    "AttachStdout": true,
    "Cmd": null,
    "CpuShares": 0,
    "Dns": null,
    "Domainname": "",
    "Entrypoint": null,
    "Env": null,
    "ExposedPorts": null,
    "Hostname": "",
    "Image": "059f2254be2b9fe7b32694e31ff247696c0dcbb6be3beb0ad6ea151a38eb616e",
    "Memory": 0,
    "MemorySwap": 0,
    "NetworkDisabled": false,
    "OpenStdin": false,
    "PortSpecs": null,
    "StdinOnce": false,
    "Tty": false,
    "User": "",
    "Volumes": {},
    "VolumesFrom": "",
    "WorkingDir": ""
}
HTTP/1.1 500 Internal Server Error
Content-Type: text/plain; charset=utf-8
Date: Sat, 20 Jun 2015 11:58:27 GMT
Content-Length: 61

json: cannot unmarshal string into Go value of type []string.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment