1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

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
parent 4ac59a1282
commit f919a26a9f
10 changed files with 15 additions and 15 deletions

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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