-
Notifications
You must be signed in to change notification settings - Fork 109
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
use multi image to support apple silicon out of the box #157
Conversation
Thanks for this, we'll add it to our backlog for review. |
These get updated dynamically, so whatever change gets made here will be overwritten at the next release https://github.com/pact-foundation/pact-broker-docker/blob/master/script/release-workflow/prepare-release.sh |
Is there a path-forward on this? I Just got
It feels like this (could / should) be a priority for all PACT projects using the dockerfile |
the dockerfile just builds for arm64 btw, so it's not insurmountable, but a pain. I encountered this while trying to troubleshoot this PR |
So Beth, are you saying we should update that script to default to multi or something else? @Lewiscowles1986 do you just need to use the |
So for me, I was not using docker-compose, but
I believe I leave such determinations to you all. changing label triggers a need to let people know to use that label, and I'm not sure if it solves needing to separately build that label. Docker supports single labels with multiple architectures. |
IIRC we were just being cautious before flicking the switch, so to speak. Agree we don't want users to have to do anything different for different platforms. We use buildx. I think this PR should just be flicking the switch, if we think the image itself is safe. |
https://github.com/pact-foundation/pact-broker-docker?tab=readme-ov-file#multi-manifest-image documented in the readme for multiple platforms. We didn't want to change existing users behaviours, who are probably using This caught a few issues that would have otherwise broken peoples workflows. We are pretty confident now, and have nothing major to report, the biggest blocker was #148 We've promoted the pact-ruby-cli project to drop the The actual change would be to to remove the pact-broker-docker/script/release-workflow/docker-push.sh Lines 7 to 17 in 47658ee
|
you could do any of the following append
use DOCKER_DEFAULT_PLATFORM env var
explicitly force an alternative platform
|
Hey @YOU54F while I could; every single place would need to change to use that, whereas updating the image tag, RE: your post before would also require no changes. I'm very interested in the logic, of lets let folks opt into a tag, which might be broken, rather than; if it is broken then they can use platform flag to request amd64 and run non-native. I wasn't manually running this image, someone seems to have asked the PHP PACT to run this image. I'd imagined you knew about this and that it was common; but perhaps my assumption there is faulty. |
When I built the images I proposed the question to the author, re the tags prefixed with I didn't want to do anything that adversely affected anyones existing workflow, as the PB is relied on by a unknown number of parties, the only time we usually find out things are wrong, that we haven't found, is via issue reports.
I don't recall this specific instance but can recall about 10 occasions where people have asked about a platform specific image, since release. Our prior guidance was to force emulation on non-native systems. I encounted it when moving to an M1 mac, so was keen to get new images out there at the very least for me, and for others, but also very keen not to negatively impact anyone. It certainly wasn't high enough on anyones want list to have made a PR themselves. It's probably time to switch now though, so for everyone, it just works, I've given it a fair old battle testing, and we've dropped the multi prefix on the pact-cli. I'd also like to publish the images to GitHub container registry, as we've had a couple (not many) requests from users who are being rate-limited and although not directly on this project, it makes sense for consistency across all of the pact-foundations images |
So this pull should close and it should be built now for ARM as well as x86_64/AMD64? |
Closing in favour of #171 Thanks for raising Alex |
I think it makes sense to use
multi
image instead since otherwise on new macs withoutDOCKER_DEFAULT_PLATFORM=linux/amd64
you would get an error: