Fix incorrect request json body for `/containers/create` in remote API docs.

This fix tries to fix the incorrect request json body for
`/containers/create` in remote API docs.

When using the example json request for `/containers/create`, there are two
errors:
(1). `invalid character '"' after object key:value pair`
     This is because a `,` is missing after `"Volumes": {}`
     This issue exists in v1.20-v1.24
(2). `Invalid --security-opt: ""`
     This is becasue in `"SecurityOpt": [""]` line, an empty string
     `""` is passed yet `""` is not a valid `SecurityOpt`. Either no string,
     or a valid string (e.g., "no-new-privileges") could be used.
     This issue exists in v1.15-v1.24

This fix updates the docs and correct the above two issues.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This commit is contained in:
Yong Tang 2016-04-09 18:30:48 +00:00
Родитель 4ac59a1282
Коммит f919a26a9f
10 изменённых файлов: 15 добавлений и 15 удалений

Просмотреть файл

@ -151,7 +151,7 @@ Create a container
"ExposedPorts": {
"22/tcp": {}
},
"SecurityOpts": [""],
"SecurityOpts": [],
"HostConfig": {
"Binds": ["/tmp:/tmp"],
"Links": ["redis3:redis"],

Просмотреть файл

@ -151,7 +151,7 @@ Create a container
"ExposedPorts": {
"22/tcp": {}
},
"SecurityOpts": [""],
"SecurityOpts": [],
"HostConfig": {
"Binds": ["/tmp:/tmp"],
"Links": ["redis3:redis"],

Просмотреть файл

@ -168,7 +168,7 @@ Create a container
"RestartPolicy": { "Name": "", "MaximumRetryCount": 0 },
"NetworkMode": "bridge",
"Devices": [],
"SecurityOpt": [""]
"SecurityOpt": []
}
}

Просмотреть файл

@ -184,7 +184,7 @@ Create a container
"Devices": [],
"Ulimits": [{}],
"LogConfig": { "Type": "json-file", Config: {} },
"SecurityOpt": [""],
"SecurityOpt": [],
"CgroupParent": ""
}
}

Просмотреть файл

@ -191,7 +191,7 @@ Create a container
"Devices": [],
"Ulimits": [{}],
"LogConfig": { "Type": "json-file", "Config": {} },
"SecurityOpt": [""],
"SecurityOpt": [],
"CgroupParent": ""
}
}

Просмотреть файл

@ -156,7 +156,7 @@ Create a container
},
"Volumes": {
"/volumes/data": {}
}
},
"WorkingDir": "",
"NetworkDisabled": false,
"MacAddress": "12:34:56:78:9a:bc",
@ -193,7 +193,7 @@ Create a container
"Devices": [],
"Ulimits": [{}],
"LogConfig": { "Type": "json-file", "Config": {} },
"SecurityOpt": [""],
"SecurityOpt": [],
"CgroupParent": ""
}
}

Просмотреть файл

@ -160,7 +160,7 @@ Create a container
},
"Volumes": {
"/volumes/data": {}
}
},
"WorkingDir": "",
"NetworkDisabled": false,
"MacAddress": "12:34:56:78:9a:bc",
@ -201,7 +201,7 @@ Create a container
"Devices": [],
"Ulimits": [{}],
"LogConfig": { "Type": "json-file", "Config": {} },
"SecurityOpt": [""],
"SecurityOpt": [],
"CgroupParent": "",
"VolumeDriver": ""
}

Просмотреть файл

@ -248,7 +248,7 @@ Create a container
},
"Volumes": {
"/volumes/data": {}
}
},
"WorkingDir": "",
"NetworkDisabled": false,
"MacAddress": "12:34:56:78:9a:bc",
@ -294,7 +294,7 @@ Create a container
"Devices": [],
"Ulimits": [{}],
"LogConfig": { "Type": "json-file", "Config": {} },
"SecurityOpt": [""],
"SecurityOpt": [],
"CgroupParent": "",
"VolumeDriver": "",
"ShmSize": 67108864

Просмотреть файл

@ -267,7 +267,7 @@ Create a container
},
"Volumes": {
"/volumes/data": {}
}
},
"WorkingDir": "",
"NetworkDisabled": false,
"MacAddress": "12:34:56:78:9a:bc",
@ -313,7 +313,7 @@ Create a container
"Devices": [],
"Ulimits": [{}],
"LogConfig": { "Type": "json-file", "Config": {} },
"SecurityOpt": [""],
"SecurityOpt": [],
"CgroupParent": "",
"VolumeDriver": "",
"ShmSize": 67108864

Просмотреть файл

@ -267,7 +267,7 @@ Create a container
},
"Volumes": {
"/volumes/data": {}
}
},
"WorkingDir": "",
"NetworkDisabled": false,
"MacAddress": "12:34:56:78:9a:bc",
@ -313,7 +313,7 @@ Create a container
"Devices": [],
"Ulimits": [{}],
"LogConfig": { "Type": "json-file", "Config": {} },
"SecurityOpt": [""],
"SecurityOpt": [],
"StorageOpt": {},
"CgroupParent": "",
"VolumeDriver": "",