abh1nav / docker-rust Goto Github PK
View Code? Open in Web Editor NEWDocker client library written in Rust
Docker client library written in Rust
Your project is listed https://docs.docker.com/engine/api/sdk/ so if you consider archiving it you might ask to get un-indexed.
Example request:
GET /containers/4fa6e0f0c678/json HTTP/1.1
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
{
"Id": "4fa6e0f0c6786287e131c3852c58a2e01cc697a68231826813597e4994f1d6e2",
"Created": "2013-05-07T14:51:42.041847+02:00",
"Path": "date",
"Args": [],
"Config": {
"Hostname": "4fa6e0f0c678",
"User": "",
"Memory": 0,
"MemorySwap": 0,
"AttachStdin": false,
"AttachStdout": true,
"AttachStderr": true,
"PortSpecs": null,
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": null,
"Cmd": [
"date"
],
"Dns": null,
"Image": "base",
"Volumes": {},
"VolumesFrom": "",
"WorkingDir":""
},
"State": {
"Running": false,
"Pid": 0,
"ExitCode": 0,
"StartedAt": "2013-05-07T14:51:42.087658+02:01360",
"Ghost": false
},
"Image": "b750fe79269d2ec9a3c593ef05b4332b1d1a02a62b4accb2c21d589ff2f5f2dc",
"NetworkSettings": {
"IpAddress": "",
"IpPrefixLen": 0,
"Gateway": "",
"Bridge": "",
"PortMapping": null
},
"SysInitPath": "/home/kitty/go/src/github.com/dotcloud/docker/bin/docker",
"ResolvConfPath": "/etc/resolv.conf",
"Volumes": {},
"HostConfig": {
"Binds": null,
"ContainerIDFile": "",
"LxcConf": [],
"Privileged": false,
"PortBindings": {
"80/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": "49153"
}
]
},
"Links": null,
"PublishAllPorts": false
}
}
Status Codes:
Example request:
GET /info HTTP/1.1
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
{
"Containers":11,
"Images":16,
"Debug":false,
"NFd": 11,
"NGoroutines":21,
"MemoryLimit":true,
"SwapLimit":false,
"IPv4Forwarding":true
}
Status Codes:
Example request:
POST /containers/16253994b7c4/wait HTTP/1.1
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
{"StatusCode":0}
Status Codes:
Example request:
POST /containers/(id)/start HTTP/1.1
Content-Type: application/json
{
"Binds":["/tmp:/tmp"],
"LxcConf":{"lxc.utsname":"docker"},
"PortBindings":{ "22/tcp": [{ "HostPort": "11022" }] },
"PublishAllPorts":false,
"Privileged":false,
"Dns": ["8.8.8.8"],
"VolumesFrom": ["parent", "other:ro"]
}
Example response:
HTTP/1.1 204 No Content
Content-Type: text/plain
Json Parameters:
Status Codes:
GET /images/json?all=0 HTTP/1.1
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"RepoTags": [
"ubuntu:12.04",
"ubuntu:precise",
"ubuntu:latest"
],
"Id": "8dbd9e392a964056420e5d58ca5cc376ef18e2de93b5cc90e868a1bbc8318c1c",
"Created": 1365714795,
"Size": 131506275,
"VirtualSize": 131506275
},
{
"RepoTags": [
"ubuntu:12.10",
"ubuntu:quantal"
],
"ParentId": "27cf784147099545",
"Id": "b750fe79269d2ec9a3c593ef05b4332b1d1a02a62b4accb2c21d589ff2f5f2dc",
"Created": 1364102658,
"Size": 24653,
"VirtualSize": 180116135
}
]
Query Parameters:
Example request:
GET /containers/json?all=1&before=8dfafdbc3a40&size=1 HTTP/1.1
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"Id": "8dfafdbc3a40",
"Image": "base:latest",
"Command": "echo 1",
"Created": 1367854155,
"Status": "Exit 0",
"Ports":[{"PrivatePort": 2222, "PublicPort": 3333, "Type": "tcp"}],
"SizeRw":12288,
"SizeRootFs":0
},
{
"Id": "9cd87474be90",
"Image": "base:latest",
"Command": "echo 222222",
"Created": 1367854155,
"Status": "Exit 0",
"Ports":[],
"SizeRw":12288,
"SizeRootFs":0
},
{
"Id": "3176a2479c92",
"Image": "base:latest",
"Command": "echo 3333333333333333",
"Created": 1367854154,
"Status": "Exit 0",
"Ports":[],
"SizeRw":12288,
"SizeRootFs":0
},
{
"Id": "4cb07b47f9fb",
"Image": "base:latest",
"Command": "echo 444444444444444444444444444444444",
"Created": 1367854152,
"Status": "Exit 0",
"Ports":[],
"SizeRw":12288,
"SizeRootFs":0
}
]
Query Parameters:
limit
last createdStatus Codes:
Example request:
POST /containers/e90e34656806/stop?t=5 HTTP/1.1
Example response:
HTTP/1.1 204 OK
Query Parameters:
Status Codes:
Example request:
POST /containers/e90e34656806/kill HTTP/1.1
Example response:
HTTP/1.1 204 OK
Query Parameters
Status Codes:
Example request:
DELETE /containers/16253994b7c4?v=1 HTTP/1.1
Example response:
HTTP/1.1 204 OK
Query Parameters:
Status Codes:
Example request:
GET /images/base/json HTTP/1.1
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
{
"Created":"2013-03-23T22:24:18.818426-07:00",
"Container":"3d67245a8d72ecf13f33dffac9f79dcdf70f75acb84d308770391510e0c23ad0",
"ContainerConfig":
{
"Hostname":"",
"User":"",
"Memory":0,
"MemorySwap":0,
"AttachStdin":false,
"AttachStdout":false,
"AttachStderr":false,
"PortSpecs":null,
"Tty":true,
"OpenStdin":true,
"StdinOnce":false,
"Env":null,
"Cmd": ["/bin/bash"]
,"Dns":null,
"Image":"base",
"Volumes":null,
"VolumesFrom":"",
"WorkingDir":""
},
"Id":"b750fe79269d2ec9a3c593ef05b4332b1d1a02a62b4accb2c21d589ff2f5f2dc",
"Parent":"27cf784147099545",
"Size": 6824592
}
Status Codes:
Example request:
DELETE /images/test HTTP/1.1
Example response:
HTTP/1.1 200 OK
Content-type: application/json
[
{"Untagged":"3e2f21a89f"},
{"Deleted":"3e2f21a89f"},
{"Deleted":"53b4f83ac9"}
]
Query Parameters:
Status Codes:
Example request:
GET /version HTTP/1.1
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
{
"Version":"0.2.2",
"GitCommit":"5a2a5cc+CHANGES",
"GoVersion":"go1.0.3"
}
Status Codes:
Example request:
POST /containers/e90e34656806/restart?t=5 HTTP/1.1
Example response:
HTTP/1.1 204 OK
Query Parameters:
Status Codes:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.