Moved "Memory", "MemorySwap" and "CpuShares" mappings from ContainerConfig to HostConfig#291
Conversation
|
Description? |
|
Added description. |
|
Will it be compatible with non 1.18 API? |
|
It is compatible with 1.18 and current 1.19 API. And README.md says that docker-java supports Docker Remote API v1.19, Docker Server version 1.7.x. |
|
Supports = works on, but this doesn't clain that old APIs should be broken. |
|
Without this change it doesn't work on current API. That's why I made it. |
|
We either break current API compatibility or break old API compatibility. Docker-java declares compatibility with current API, thus choice is obvious. |
|
Whoever wants to use obsolete Docker version can use older version of Docker-java. Current Docker-java should work on current Docker. |
|
Why is it a problem to |
|
👎 for primitives, breaking backward compatibility and default values |
|
I just moved few fields and corresponding getters from one class to another to comply with changes in docker API. And i did it respecting existing code conventions regarding primitives and default values. |
|
While trying to merge this PR I found other inconsistencies regarding |
Moved "Memory", "MemorySwap" and "CpuShares" mappings from ContainerConfig to HostConfig
|
Thanks for your contribution. I will fix remaining |
Moved "Memory", "MemorySwap" and "CpuShares" fields from ContainerConfig to HostConfig. This is to comply with current Docker Remote API (v1.18 and greater). On inspect command docker server returns json, where these fields are under "HostConfig" section, not "Config". See https://docs.docker.com/docker/reference/api/docker_remote_api_v1.19/#inspect-a-container