You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docker-modem v3.0.1 / PR #133 (then modified by PR #134 / v3.0.2) introduced a bug that manifests as the following image build error message when the build options include a volumes array -
→ The volumes array was stringified as '["/var/lib/docker/tmp:/var/lib/docker/tmp:rw"]' prior to conversion to a query string, and the image build would succeed.
→ The volumes array is not stringified, and this causes Docker (balenaEngine) to produce the HTTP 500 server error quoted above.
This issue was originally reported by a balena CLI end user in balena-io/balena-cli/issues/2440 . The workaround is to downgrade and pin docker-modem to v3.0.0.
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 fixesapocas/dockerode#605 and apocas#139 and effectively reverts apocas#133 and apocas#134.
docker-modem
v3.0.1 / PR #133 (then modified by PR #134 / v3.0.2) introduced a bug that manifests as the following image build error message when the build options include avolumes
array -I had already added a comment to the PR itself (#133 (comment)). Now creating this issue so that the comment does not get forgotten too easily.
The query string produced by the
buildQuerystring
function (see #133) is:Before PR #133:
't=balena-secrets%3Alatest&volumes=%5B%22%2Fvar%2Flib%2Fdocker%2Ftmp%3A%2Fvar%2Flib%2Fdocker%2Ftmp%3Arw%22%5D&forcerm=true'
→ The
volumes
array was stringified as'["/var/lib/docker/tmp:/var/lib/docker/tmp:rw"]'
prior to conversion to a query string, and the image build would succeed.After PR #133:
't=balena-secrets%3Alatest&volumes=%2Fvar%2Flib%2Fdocker%2Ftmp%3A%2Fvar%2Flib%2Fdocker%2Ftmp%3Arw&forcerm=true'
→ The
volumes
array is not stringified, and this causes Docker (balenaEngine) to produce the HTTP 500 server error quoted above.This issue was originally reported by a balena CLI end user in balena-io/balena-cli/issues/2440 . The workaround is to downgrade and pin
docker-modem
to v3.0.0.cc: @robertgzr
The text was updated successfully, but these errors were encountered: