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 requires docker daemon even when no docker usage is requested
- Add Custom Staging Bucket Option
- Image Digest mismatch when using Jib Builder with/without Docker HOT 1
- invalid skaffold config: proxy: unknown scheme: http
- Upgrade skaffold go version to 1.21.6
- Sync copies file changes to the deployed container however the changes are not reflected post successful syncing HOT 1
- schema check baseRef should not be hard-coded
- Cannot get resourceSelector to work on CRD SparkApplication (sparkoperator.k8s.io) HOT 1
- Data race in tar.go
- skaffold dev - some way to force replacement of already tagged/digest images (feature request) HOT 1
- Build/Render/Run Fails with Kaniko + Immutable Tags HOT 1
- Document skaffold cache behavior
- z
- Bazel root not detected properly when using bzlmod
- Get "docker compose not yet supported by skaffold" when trying to deploy a docker container with useCompose: true HOT 2
- VSCode disconnects from DevContainer when running skaffold build HOT 3
- Strip multiple strings or, ideally, regex or glob from manual sync destination
- Sync with manual mapping not working when multiple files are changed of which the first one is not mapped HOT 2
- Cannot install via `go install`
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.