Skip to content
This repository has been archived by the owner on Mar 31, 2022. It is now read-only.

Fix cachefrom option to work correctly #317

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

Conversation

seanwang-okta
Copy link

Currently, the cacheFrom build option, which pulls a Docker image to use it for the build cache doesn't seem to be working. It pulls the image and says it will use the image for the build cache, but it doesn't actually get used. This PR fixes it.

https://docs.docker.com/engine/api/v1.40/#operation/ImageBuild
According to the Docker engine API docs it should be passed in as "cachefrom" and does not need to be encoded, just as a JSON list.

This fix is crucial when building on serverless hosts, since images end up being rebuilt without the build cache which takes extra time, and it also ends up taking extra space when pushing the image to a Docker registry.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant