Open crazy-max opened 4 years ago
moby/buildkit:buildx-stable-1
and moby/buildkit:v0.7.2
is the same image (atm).
# docker buildx imagetools inspect --raw moby/buildkit:buildx-stable-1 | openssl dgst -sha256
c5dbe36aa78f10ec70978ecea8c731f5b8ba2dfaf8de43c17263fba1b212f433
# docker buildx imagetools inspect --raw moby/buildkit:v0.7.2 | openssl dgst -sha256
c5dbe36aa78f10ec70978ecea8c731f5b8ba2dfaf8de43c17263fba1b212f433
Buildx defalts to last stable buildkit. Special tag is used so that buildx can always pick up the last (compatible, that is what -1
is for) release without requiring a new release of buildx.
We could add some annotations to describe the image. You can already run --version
on it.
# docker run --rm moby/buildkit:buildx-stable-1 --version
buildkitd github.com/moby/buildkit v0.7.2 22e230744171b4442101731951bbbecf97796ea5
@tonistiigi
Special tag is used so that buildx can always pick up the last (compatible, that is what -1 is for) release without requiring a new release of buildx.
Ok I would have thought that the buildkit version used as DefaultImage
should be strictly linked to the buildkit version in the go.mod.
We could add some annotations to describe the image. You can already run --version on it.
Yes but I think for the average user it should clearly show the current buildkit version used when a builder is created. Annotations looks a good solution!
@tonistiigi Now that buildkit v0.8.0 is out and the tagging has changed, do you think we should change the behavior also on buildx and have instead:
DefaultImage = "moby/buildkit:latest"
DefaultRootlessImage = "moby/buildkit:rootless"
I updated buildx-stable-1
. Forgot about rootless, we need a similar tag for that and switch to that tag in code.
Reason for not using latest is:
Buildx defaults to last stable buildkit. Special tag is used so that buildx can always pick up the last (compatible, that is what -1 is for) release without requiring a new release of buildx.
So we leave ourselves an option to do an incompatible release (for buildx) that we don't want to auto upgrade.
https://github.com/docker/buildx/blob/8bce430f4d74c9a9ca72a46139804e88502d4b78/driver/bkimage/bkimage.go#L4-L5
To make debugging easier, the default image should be set to a Buildkit version like
moby/buildkit:v0.7.2
or maybe extract current Buildkit version dynamically fromgo.mod
. Same could be applied forDefaultRootlessImage
.