-
Notifications
You must be signed in to change notification settings - Fork 545
multi platform with multi tags, buildx error #459
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
Comments
And I try to push to dockerhub, and I found build success, but only push the first tag. |
buildkit issue. create builder with |
This didn't work for me. Does anyone know of some other workaround? regular |
I figured it out. Here's the workaround I'm using right now: docker buildx build --tag foo/bar:1.0.0 --platform linux/amd64,linux/arm64 .
docker manifest inspect foo/bar:1.0.0
# returns a json with 2 shas:
# {
# "schemaVersion": 2,
# "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
# "manifests": [
# {
# "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
# "size": 1992,
# "digest": "sha256:c3ab8ff13720e8ad9047dd39466b3c8974e592c2fa383d4a3960714caef0c4f2",
# "platform": {
# "architecture": "arm64",
# "os": "linux"
# }
# },
# {
# "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
# "size": 1992,
# "digest": "sha256:974e592c2fa383d4a3960714caef0c4f2c3ab8ff13720e8ad9047dd39466b3c8",
# "platform": {
# "architecture": "amd64",
# "os": "linux"
# }
# }
# ]
# }
# replace shas with the ones you got from the previous command:
docker manifest create foo/bar:latest \
foo/bar@sha256:c3ab8ff13720e8ad9047dd39466b3c8974e592c2fa383d4a3960714caef0c4f2 \
foo/bar@sha256:974e592c2fa383d4a3960714caef0c4f2c3ab8ff13720e8ad9047dd39466b3c8
docker manifest push foo/bar:latest ^ this will build (and push) a multi-arch image with tags |
@petethepig which version of buildx you used? |
|
@petethepig strange. do you create a new builder with
it works well kiali/kiali#3405 (comment) |
not sure if it matters, but I also use 2 separate machines like this: docker buildx create --use --name mybuilder --driver-opt=image=moby/buildkit:v0.8.0 --platform linux/arm64
docker buildx create --append --name mybuilder secondmachine --driver-opt=image=moby/buildkit:v0.8.0 --platform linux/amd64 |
@petethepig I use 2 separate machines too. multi tag publishing works well. try with |
@morlay thanks! I'll try it soon, not today, but in the next few days. |
not work for me - - |
docker buildx build --platform linux/amd64,linux/arm64 --push --pull -t xxxxxx/test:1 -t xxxxxx/test:2 -f nginx.Dockerfile .
The text was updated successfully, but these errors were encountered: