-
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 example to use docker buildx via the custom builder #5426
Add example to use docker buildx via the custom builder #5426
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5426 +/- ##
==========================================
+ Coverage 71.34% 71.39% +0.04%
==========================================
Files 399 397 -2
Lines 14508 14540 +32
==========================================
+ Hits 10351 10381 +30
- Misses 3385 3388 +3
+ Partials 772 771 -1
Continue to review full report at Codecov.
|
custom: | ||
# This buildCommand depends on a `docker buildx` builder to have been created | ||
# with the name `skaffold-builder`: | ||
# $ docker buildx create --name skaffold-builder --platform linux/amd64,linux/arm64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we also need to add the docker buildx use skaffold-builder
command.
or add the --use
flag to docker buildx create --name skaffold-builder --platform linux/amd64,linux/arm64
command.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a slight preference to explicitly specifying the builder with --builder
as the message if the user hasn't created a builder and continues to use the default docker builder is cryptic:
error: multiple platforms feature is currently not supported for docker driver. Please switch to a different driver (eg. "docker buildx create --use")
Whereas explicitly specifying --builder xxx
where xxx
doesn't exist fails with a slightly more coherent message:
error: open /Users/bdealwis/.docker/buildx/instances/foo: no such file or directory
Co-authored-by: Tejal Desai <tejal29@gmail.com>
Co-authored-by: Tejal Desai <tejal29@gmail.com>
Rework the README and add a cautionary note on interactions with artifact caching.
PTAL @PriyaModali |
Co-authored-by: Tejal Desai <tejal29@gmail.com>
Description
This example demonstrates how to use
docker buildx
as a Skaffold custom builder.The one downside is that it requires setting up a
docker buildx
builder instance as a separate step. Something like:We could create a more sophisticated build script that would examine the existing builder instances, but that's a bit more involved.