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>
| ... | ... |
@@ -156,7 +156,7 @@ Create a container |
| 156 | 156 |
}, |
| 157 | 157 |
"Volumes": {
|
| 158 | 158 |
"/volumes/data": {}
|
| 159 |
- } |
|
| 159 |
+ }, |
|
| 160 | 160 |
"WorkingDir": "", |
| 161 | 161 |
"NetworkDisabled": false, |
| 162 | 162 |
"MacAddress": "12:34:56:78:9a:bc", |
| ... | ... |
@@ -193,7 +193,7 @@ Create a container |
| 193 | 193 |
"Devices": [], |
| 194 | 194 |
"Ulimits": [{}],
|
| 195 | 195 |
"LogConfig": { "Type": "json-file", "Config": {} },
|
| 196 |
- "SecurityOpt": [""], |
|
| 196 |
+ "SecurityOpt": [], |
|
| 197 | 197 |
"CgroupParent": "" |
| 198 | 198 |
} |
| 199 | 199 |
} |
| ... | ... |
@@ -160,7 +160,7 @@ Create a container |
| 160 | 160 |
}, |
| 161 | 161 |
"Volumes": {
|
| 162 | 162 |
"/volumes/data": {}
|
| 163 |
- } |
|
| 163 |
+ }, |
|
| 164 | 164 |
"WorkingDir": "", |
| 165 | 165 |
"NetworkDisabled": false, |
| 166 | 166 |
"MacAddress": "12:34:56:78:9a:bc", |
| ... | ... |
@@ -201,7 +201,7 @@ Create a container |
| 201 | 201 |
"Devices": [], |
| 202 | 202 |
"Ulimits": [{}],
|
| 203 | 203 |
"LogConfig": { "Type": "json-file", "Config": {} },
|
| 204 |
- "SecurityOpt": [""], |
|
| 204 |
+ "SecurityOpt": [], |
|
| 205 | 205 |
"CgroupParent": "", |
| 206 | 206 |
"VolumeDriver": "" |
| 207 | 207 |
} |
| ... | ... |
@@ -248,7 +248,7 @@ Create a container |
| 248 | 248 |
}, |
| 249 | 249 |
"Volumes": {
|
| 250 | 250 |
"/volumes/data": {}
|
| 251 |
- } |
|
| 251 |
+ }, |
|
| 252 | 252 |
"WorkingDir": "", |
| 253 | 253 |
"NetworkDisabled": false, |
| 254 | 254 |
"MacAddress": "12:34:56:78:9a:bc", |
| ... | ... |
@@ -294,7 +294,7 @@ Create a container |
| 294 | 294 |
"Devices": [], |
| 295 | 295 |
"Ulimits": [{}],
|
| 296 | 296 |
"LogConfig": { "Type": "json-file", "Config": {} },
|
| 297 |
- "SecurityOpt": [""], |
|
| 297 |
+ "SecurityOpt": [], |
|
| 298 | 298 |
"CgroupParent": "", |
| 299 | 299 |
"VolumeDriver": "", |
| 300 | 300 |
"ShmSize": 67108864 |
| ... | ... |
@@ -267,7 +267,7 @@ Create a container |
| 267 | 267 |
}, |
| 268 | 268 |
"Volumes": {
|
| 269 | 269 |
"/volumes/data": {}
|
| 270 |
- } |
|
| 270 |
+ }, |
|
| 271 | 271 |
"WorkingDir": "", |
| 272 | 272 |
"NetworkDisabled": false, |
| 273 | 273 |
"MacAddress": "12:34:56:78:9a:bc", |
| ... | ... |
@@ -313,7 +313,7 @@ Create a container |
| 313 | 313 |
"Devices": [], |
| 314 | 314 |
"Ulimits": [{}],
|
| 315 | 315 |
"LogConfig": { "Type": "json-file", "Config": {} },
|
| 316 |
- "SecurityOpt": [""], |
|
| 316 |
+ "SecurityOpt": [], |
|
| 317 | 317 |
"CgroupParent": "", |
| 318 | 318 |
"VolumeDriver": "", |
| 319 | 319 |
"ShmSize": 67108864 |
| ... | ... |
@@ -267,7 +267,7 @@ Create a container |
| 267 | 267 |
}, |
| 268 | 268 |
"Volumes": {
|
| 269 | 269 |
"/volumes/data": {}
|
| 270 |
- } |
|
| 270 |
+ }, |
|
| 271 | 271 |
"WorkingDir": "", |
| 272 | 272 |
"NetworkDisabled": false, |
| 273 | 273 |
"MacAddress": "12:34:56:78:9a:bc", |
| ... | ... |
@@ -313,7 +313,7 @@ Create a container |
| 313 | 313 |
"Devices": [], |
| 314 | 314 |
"Ulimits": [{}],
|
| 315 | 315 |
"LogConfig": { "Type": "json-file", "Config": {} },
|
| 316 |
- "SecurityOpt": [""], |
|
| 316 |
+ "SecurityOpt": [], |
|
| 317 | 317 |
"StorageOpt": {},
|
| 318 | 318 |
"CgroupParent": "", |
| 319 | 319 |
"VolumeDriver": "", |