Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use JSON serialization for cachefrom option #793

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pipex
Copy link

@pipex pipex commented Feb 24, 2025

Docker ImageBuild endpoint requires that the cachefrom option is a "JSON serialized array". This requirement seems to be an exception to the way arrays are consumed by the API (usually querystring serialized).

This change is needed after apocas/docker-modem#181 that makes querystring serialized arrays the default.

This commit adds an exception for this option on Docker.buildImage.

Change-type: patch
Closes: #792

@pipex pipex force-pushed the build-image-from-cache branch from b9b66ef to dd15e14 Compare February 24, 2025 20:42
Docker [ImageBuild](https://docs.docker.com/reference/api/engine/version/v1.48/#tag/Image/operation/ImageBuild) endpoint requires
that the `cachefrom` option is a "JSON serialized array". This
requirement seems to be an exception to the way arrays are consumed by
the API (usually querystring serialized).

This change is needed after apocas/docker-modem#181 that makes querystring serialized arrays the default.

This commit adds an exception for this option on `Docker.buildImage`.

Change-type: patch
Closes: apocas#792
@pipex pipex force-pushed the build-image-from-cache branch from dd15e14 to 88597cc Compare February 24, 2025 20:46
pipex added a commit to balena-io-modules/balena-compose that referenced this pull request Feb 24, 2025
A change the way options are serialized in docker-modem causes an issue
with builds using the `cachefrom` option and library tests to fail.
This change can be reverted if apocas/dockerode#793 is merged.

Change-type: patch
Relates-to: apocas/docker-modem#181
Relates-to: apocas/dockerode#792
pipex added a commit to balena-io-modules/balena-compose that referenced this pull request Feb 25, 2025
A change the way options are serialized in docker-modem causes an issue
with builds using the `cachefrom` option and library tests to fail.
This change can be reverted if apocas/dockerode#793 is merged.

Change-type: patch
Relates-to: apocas/docker-modem#181
Relates-to: apocas/dockerode#792
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The cachefrom option in Docker.buildImage is not JSON serialized
1 participant