From cbd50baf8b8e52cfbf7a762389b3be4f9915fc27 Mon Sep 17 00:00:00 2001 From: Yong Tang Date: Sat, 9 Apr 2016 18:30:48 +0000 Subject: [PATCH] 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 (cherry picked from commit f919a26a9fb96ef07133183b4f693ff9508ae823) --- docs/reference/api/docker_remote_api_v1.15.md | 2 +- docs/reference/api/docker_remote_api_v1.16.md | 2 +- docs/reference/api/docker_remote_api_v1.17.md | 2 +- docs/reference/api/docker_remote_api_v1.18.md | 2 +- docs/reference/api/docker_remote_api_v1.19.md | 2 +- docs/reference/api/docker_remote_api_v1.20.md | 4 ++-- docs/reference/api/docker_remote_api_v1.21.md | 4 ++-- docs/reference/api/docker_remote_api_v1.22.md | 4 ++-- docs/reference/api/docker_remote_api_v1.23.md | 4 ++-- 9 files changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/reference/api/docker_remote_api_v1.15.md b/docs/reference/api/docker_remote_api_v1.15.md index c95a66b0a4..f6a860a4f9 100644 --- a/docs/reference/api/docker_remote_api_v1.15.md +++ b/docs/reference/api/docker_remote_api_v1.15.md @@ -151,7 +151,7 @@ Create a container "ExposedPorts": { "22/tcp": {} }, - "SecurityOpts": [""], + "SecurityOpts": [], "HostConfig": { "Binds": ["/tmp:/tmp"], "Links": ["redis3:redis"], diff --git a/docs/reference/api/docker_remote_api_v1.16.md b/docs/reference/api/docker_remote_api_v1.16.md index f91f408495..630da70144 100644 --- a/docs/reference/api/docker_remote_api_v1.16.md +++ b/docs/reference/api/docker_remote_api_v1.16.md @@ -151,7 +151,7 @@ Create a container "ExposedPorts": { "22/tcp": {} }, - "SecurityOpts": [""], + "SecurityOpts": [], "HostConfig": { "Binds": ["/tmp:/tmp"], "Links": ["redis3:redis"], diff --git a/docs/reference/api/docker_remote_api_v1.17.md b/docs/reference/api/docker_remote_api_v1.17.md index 3da962b074..9baa758cc5 100644 --- a/docs/reference/api/docker_remote_api_v1.17.md +++ b/docs/reference/api/docker_remote_api_v1.17.md @@ -168,7 +168,7 @@ Create a container "RestartPolicy": { "Name": "", "MaximumRetryCount": 0 }, "NetworkMode": "bridge", "Devices": [], - "SecurityOpt": [""] + "SecurityOpt": [] } } diff --git a/docs/reference/api/docker_remote_api_v1.18.md b/docs/reference/api/docker_remote_api_v1.18.md index 421b169623..9de2cc6cf1 100644 --- a/docs/reference/api/docker_remote_api_v1.18.md +++ b/docs/reference/api/docker_remote_api_v1.18.md @@ -184,7 +184,7 @@ Create a container "Devices": [], "Ulimits": [{}], "LogConfig": { "Type": "json-file", Config: {} }, - "SecurityOpt": [""], + "SecurityOpt": [], "CgroupParent": "" } } diff --git a/docs/reference/api/docker_remote_api_v1.19.md b/docs/reference/api/docker_remote_api_v1.19.md index 9eeb353efe..e049dbe7c4 100644 --- a/docs/reference/api/docker_remote_api_v1.19.md +++ b/docs/reference/api/docker_remote_api_v1.19.md @@ -191,7 +191,7 @@ Create a container "Devices": [], "Ulimits": [{}], "LogConfig": { "Type": "json-file", "Config": {} }, - "SecurityOpt": [""], + "SecurityOpt": [], "CgroupParent": "" } } diff --git a/docs/reference/api/docker_remote_api_v1.20.md b/docs/reference/api/docker_remote_api_v1.20.md index ac0fc80813..dd47ff7f1f 100644 --- a/docs/reference/api/docker_remote_api_v1.20.md +++ b/docs/reference/api/docker_remote_api_v1.20.md @@ -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": "" } } diff --git a/docs/reference/api/docker_remote_api_v1.21.md b/docs/reference/api/docker_remote_api_v1.21.md index 6b3ac2e825..7cdfd0f3f3 100644 --- a/docs/reference/api/docker_remote_api_v1.21.md +++ b/docs/reference/api/docker_remote_api_v1.21.md @@ -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": "" } diff --git a/docs/reference/api/docker_remote_api_v1.22.md b/docs/reference/api/docker_remote_api_v1.22.md index badd170566..d9a860a774 100644 --- a/docs/reference/api/docker_remote_api_v1.22.md +++ b/docs/reference/api/docker_remote_api_v1.22.md @@ -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 diff --git a/docs/reference/api/docker_remote_api_v1.23.md b/docs/reference/api/docker_remote_api_v1.23.md index d235e4219c..eac495f09f 100644 --- a/docs/reference/api/docker_remote_api_v1.23.md +++ b/docs/reference/api/docker_remote_api_v1.23.md @@ -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