-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add buildx option for daemon-less BuildKit support #8172
base: main
Are you sure you want to change the base?
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Thanks @ebekebe for creating this PR. We've been discussing how
Feel free to take a stab at writing this doc. We can't merge just the set of changes in this PR unfortunately. |
Hi @gsquared94, I can see that there is no straight-forward design and more discussion is required. This PR is merely a solution to a more fundamental challenge: We would like to use
So given our use case, it would be totally fine with me to reduce the scope of the PR from "buildx" to "don't contact docker-daemon after build". Would that be something that could be done in smaller amount of time? Maybe there is an option we haven't considered yet and that could also help us on our quest of sharing as much config between CI and local dev. Do you have a recommendation? Finally, I feel this PR is not the right place to discuss these high-level design matters. Can you point me to where the discussion should happen (slack, mailing list, issue)? Thanks |
`docker buildx build` can be configured to execute a remote buildkit instance. No docker daemon is necessary for this to work. This commit removes dependencies on docker daemon if `buildx` is used, so `skaffold build` can be used in a CI without docker daemon.
Since I haven't received a reply for months now, we moved forward and worked with a patched version of skaffold that always uses Our setup looks like this:
This has worked great for us, but we would like to not maintain the patched version. So I hope there will be a discussion around the points I listed above. In the meantime, if anyone is interested, here is the patch for v2.4.1 (which I cleaned up today): ebekebe@1c1fdeb |
…Tools#6732) * detect-buildx global config option for backward compatibility * cache-tag global config option to customize cache destination * new CacheTo in DockerArtifact in configuration yaml (for docker build --cache-to) * export LoadDockerConfig to read ~/.docker/config.json for buildx detection * fix avoid loading image via buildx if no docker daemon is accessible * fix remote lookup / import missing in buildx workaround * fix image import if no docker daemon is available (under buildx) * adjust cache reference preserving tag and default cacheTo if not given * parse buildx metadata to extract ImageID digest Initially based on ebekebe's GoogleContainerTools#8172 patch ebekebe@1c1fdeb Signed-off-by: reingart@gmail.com
@ebekebe |
Related:
#6732
Description
docker buildx build
can be configured to execute against a remote buildkit instance. No docker daemon is necessary for this to work.This PR removes dependencies on docker daemon if
buildx
is used, soskaffold build
can be used in a CI without docker daemon.I appreciate feedback on this PR before I start writing unit tests:
daemonLess
instead ofbuildx
?skaffold build
, notskaffold dev
. How to best handle this?User facing changes
A new option
build.local.buildx
is added.ToDo: