Skip to content

The cachefrom option in Docker.buildImage is not JSON serialized #792

@pipex

Description

@pipex

A recent change in apocas/docker-modem#181 defaults to query string serialization of array options passed to Modem.dial.

While this change goes in the right direction as using query string arrays seems to be the approach used for many of the routes in the Docker API, there are a few exceptions, one of which is the cachefrom option in ImageBuild, which expects "JSON array of images used for build cache resolution.".

The update of docker-modem to 5.0.6 caused a breaking change in the buildImage operation, as providing a cachefrom array argument now will result in the following error

Error: (HTTP code 400) unexpected - error reading cache-from: invalid character 'a' looking for beginning of value

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions