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:
parent
4ac59a1282
commit
f919a26a9f
10 changed files with 15 additions and 15 deletions
|
@ -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": "",
|
||||
|
|
Loading…
Reference in a new issue