apocas / docker-modem

Docker Remote API network stack driver.
Apache License 2.0
234 stars 112 forks source link

Correctly exclude a few keys from being JSON encoded #144

Closed dfunckt closed 2 years ago

dfunckt commented 2 years ago

Most Docker API parameters take JSON values but some array parameters must be passed as multiple querystring parameters. Two known such parameters are t and extrahosts for the /build endpoint. There may be others.

This changes Modem to behave in a similar way: encode values to JSON by default, except the known special cases.

This properly fixes https://github.com/apocas/dockerode/issues/605 and #139 and effectively reverts #133 and #134.