Closed larstobi closed 5 months ago
+1 to this fix, encountered after updating to Docker engine 25.0
I believe that https://github.com/moby/moby/pull/45759/ causes it. Now the moby does some IPAM validation but doesn't define IPAM.Config field as optional, when in reality, it results in null
.
See example bellow:
docker network inspect host
[
{
"Name": "host",
"Id": "3e26b5441859be3595323ce45041e3928c56b6268c23e84df68efe56a07a96e8",
"Created": "2022-04-27T11:11:07.419382146+03:00",
"Scope": "local",
"Driver": "host",
"EnableIPv6": false,
"IPAM": {
"Driver": "default",
"Options": null,
"Config": null
},
"Internal": false,
"Attachable": false,
"Ingress": false,
"ConfigFrom": {
"Network": ""
},
"ConfigOnly": false,
"Containers": {},
"Options": {},
"Labels": {}
}
]
Thanks for the PR!
This fixes a bug in the docker provider where Vagrant crashes on checking config.size when it is nil. The fix is just checking if config.size is defined?() before checking the value of it.
Here is the error message: