Skip to content
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

Any Plans to Support arm64 Images #127

Open
timnolte opened this issue Dec 5, 2023 · 8 comments
Open

Any Plans to Support arm64 Images #127

timnolte opened this issue Dec 5, 2023 · 8 comments

Comments

@timnolte
Copy link

timnolte commented Dec 5, 2023

I was starting to use the PHP image(https://hub.docker.com/r/wordpressdevelop/php) for plugin & theme development only to find that there are currently no arm64 versions of the images. Is this on anyone's radar? These images supply much more items that are required for development and CI/CD that the standard WordPress Docker images(https://hub.docker.com/_/wordpress) don't provider, like Xdebug.

@timnolte
Copy link
Author

timnolte commented Dec 5, 2023

For the time being I've basically replicated the php image Dockerfile from here in my own Dockerfile for building on arm64. https://github.com/ndigitals/wp-dev-container/blob/feature/Initial-Setup/.devcontainer/Dockerfile

I'm working on creating Dev Container pre-built images that include a number of PHP & NodeJS versions for both amd64 & arm64 platforms. I'm able to create the arm64 images because I have native arm64 GitHub Action runners. If you need any assistance with anything needed to support arm64 image builds I'd be happy to provide any assistance.

@johnbillion
Copy link
Member

See https://core.trac.wordpress.org/ticket/59930 for related discussion and a workaround

@timnolte
Copy link
Author

timnolte commented Dec 7, 2023

Hmm, there is no workaround if I'm using these images which only provide amd64 images. Sure M# macs can use a level of emulation but the experience is very often slow. However, in my case I'm building arm64 Docker images on arm64/Linux, I can't use emulation to create final native arm64 images.

@ocean90
Copy link
Member

ocean90 commented Dec 8, 2023

The workflows should get updated to make use of the official Docker actions to build multi-platform images.

@desrosj
Copy link
Contributor

desrosj commented Jan 5, 2024

The workaround in https://core.trac.wordpress.org/ticket/59930 works for the MySQL images in versions <= 5.7, but the PHP images we maintain here are only amd64 and cause the following notice when starting the environment:

! php The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested

I thought I had created an issue for switching over to the official Docker actions to build our images, but I think it was just a side discussion. I think that's the right way to go, and it opens the door to add support for more architectures as requested here.

It's on my list, though at a very low priority. If someone wants to create a PR switching the workflows over to use the recommended Docker actions, I'll happily review.

@timnolte
Copy link
Author

timnolte commented Jan 5, 2024

Just a word of warning though that GitHub doesn't provide native arm64 runners. You have to use QEMU and those build take a huge amount of time. I ended up building my own image, actually a Dev Container prebuilt image, that is based on this image and is built on native arm64 GitHub Action Runners that I maintain. Just as a comparison it would take many hours to build this image with QEMU as compared to in the minutes with a native arm64 runner.

@desrosj
Copy link
Contributor

desrosj commented Feb 12, 2024

Just a word of warning though that GitHub doesn't provide native arm64 runners.

@timnolte Just to make sure I understand. Do you mean the GitHub Action runner images? It does look like there is a macos-14 image in beta that uses an M1 processor.

@timnolte
Copy link
Author

@desrosj yes, I am talking about the GitHub Actions Runners. I know there has been something in the works at GitHub to make this available. I think the thing is that there is still a bit of complexity around generating the multiplatform images. I have some self-hosted arm64 runners that I use and it was a chore to get my multiplatform images created properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants