-
Notifications
You must be signed in to change notification settings - Fork 18.9k
Description
Description
The Docker Remote API response to GET /containers/(id or name)/json changed in version 1.20 and 1.21 from prior versions, changing the location of some fields. Docker attempts to maintain compatibility by dispatching to a versioned function, which functions properly on Linux (with logic to provide the expected values of old fields). However, on Windows, that function just calls the current version instead of the requested compatibility version.
Steps to reproduce the issue:
- Call the inspect API with the current API version on Linux
- Call the inspect API with an old (pre-1.20) version on Linux
- Call the inspect API with the current API version on Windows
- Call the inspect API with an old (pre-1.20) version on Windows
- Observe that a Linux daemon returns an appropriate response for the requested version while a Windows daemon returns the current API version response regardless of requested version
Describe the results you received:
A Windows daemon ignores the requested API version and just returns a response appropriate for the current version of the API.
Describe the results you expected:
Expected the Windows daemon to either return an appropriate response for the requested API version or to reject the request for an unsupported API version.
Output of docker version:
Client:
Version: 1.12.2-cs2-ws-beta
API version: 1.25
Go version: go1.7.1
Git commit: 050b611
Built: Tue Oct 11 02:35:40 2016
OS/Arch: windows/amd64
Server:
Version: 1.12.2-cs2-ws-beta
API version: 1.25
Go version: go1.7.1
Git commit: 050b611
Built: Tue Oct 11 02:35:40 2016
OS/Arch: windows/amd64
Output of docker info:
PS C:\Users\Administrator> docker info
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 0
Server Version: 1.12.2-cs2-ws-beta
Storage Driver: windowsfilter
Windows:
Logging Driver: json-file
Plugins:
Volume: local
Network: nat null overlay
Swarm: inactive
Default Isolation: process
Kernel Version: 10.0 14393 (14393.321.amd64fre.rs1_release_inmarket.161004-2338)
Operating System: Windows Server 2016 Datacenter
OSType: windows
Architecture: x86_64
CPUs: 8
Total Memory: 32 GiB
Name: EC2AMAZ-T211LER
ID: 6JSQ:WIFX:QJ25:TM5T:JBOG:CR7M:NSOW:X2AJ:QJXR:PRID:CLE2:6Q67
Docker Root Dir: C:\ProgramData\docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Additional environment details (AWS, VirtualBox, physical, etc.): On EC2, using Microsoft Windows Server 2016 Base with Containers - ami-5e6bce3e