Comments (4)
Hi @aizam6066 , by default skaffold uses golang docker sdk to talk to docker daemon unless users specify under local build environment to use docker cli, user want to use buildKit, or skaffold needs to perform crossplatform build.
this doc https://docs.docker.com/build/guide/multi-platform/#platform-build-arguments mentions that
This approach involves using a few pre-defined build arguments that you have access to in your Docker builds: BUILDPLATFORM and TARGETPLATFORM (and derivatives, like TARGETOS). These build arguments reflect the values you pass to the --platform flag
this seems to suggest that it only works when you use docker cli
for your build
You need to add
local:
useDockerCLI: true
under the build stanza to make your build work.
from skaffold.
Hi @aizam6066 ,
Why do you think it started breaking now after a year or so of us not having this key in our skaffold.yaml. The only thing I can think of is GH runners install the latest skaffold version and somewhere in the later version updates, this started to break?
This is related to the change I made on #9103 to enable docker build without docker cli, and the comment on that part also indicates that matcher.IsCorssPlatfom
was the condition meant to use instead of matcher.isNotEmpty()
, so before my change you had been using docker cli, but that's actually not intended behavior but it happened to be able to set BUILDPLATFORM variable, skaffold was supposed to use docker sdk to talk the daemon if the condition is false.
It looks like I don't have to create a custom build in order to use buildx features like multi-platform builds?
yeah, if skaffold run docker build with docker cli it should be using buildx by default if your docker engine is newer than 23.0
https://docs.docker.com/build/architecture/#buildx
from skaffold.
Thank you very much for the quick response there, @ericzzzzzzz! Adding useDockerCLI
did fix the issue! I just have couple follow-up questions.
- Why do you think it started breaking now after a year or so of us not having this key in our skaffold.yaml. The only thing I can think of is GH runners install the latest skaffold version and somewhere in the later version updates, this started to break?
- I had read that docker doc you shared above and I had tried without success before you replied adding
useBuildKit
to mylocal
because it seemed like docker default driver, which I thought skaffold used, did not supportbuildx
and multi-platform build and I had to specify a buildKit. It looks like I don't have to create a custom build in order to usebuildx
features like multi-platform builds?
Thanks again!
from skaffold.
Great! Thank you for the explanation. Clears up my confusion.
from skaffold.
Related Issues (20)
- skaffold.yaml: Add global field to hold YAML anchor definitions
- Skaffold stops restarting my container after some time passes HOT 1
- Dockerfile in .dockerignore is not respected, leading to unnecessary full rebuilds HOT 2
- Custom actions ignores container volumes
- watcher breaks with dockerfile using COPY --parents
- [BUG] Config dependency doesn't work when deployers are different HOT 2
- Migrate the project to CNFC HOT 4
- How to control logs format?
- skaffold is very slow when doing "intersect matchers" for images HOT 1
- "no tag provided for image" error when using --build-artifacts flag
- Unnecessary reloads of existing images
- Kaniko builder can't push to private registry
- ERRO[0001] retrying read tcp x.x.x.x:nnnnn->131.253.33.219:443: read: connection reset by peer
- Unable to pull helm dependencies from a private helm repo
- Skaffold doesn't deliver the error messages HOT 1
- Installing Skaffold
- skaffold debug does not retry connection
- Fix error message "unable to unmarshal Cloud Run Service config" for Cloud Run Job
- bazel: Changes to MODULE.bazel may be missed, causing incorrect results
- Feat: Add Go template equivalent of Krew `whoami`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from skaffold.