WordPress / wpdev-docker-images

Docker images for use with the Core local development environment.
https://hub.docker.com/u/wordpressdevelop
GNU General Public License v2.0
61 stars 22 forks source link

Any Plans to Support arm64 Images #127

Open timnolte opened 9 months ago

timnolte commented 9 months ago

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 commented 9 months ago

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 commented 9 months ago

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

timnolte commented 9 months ago

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 commented 9 months ago

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

desrosj commented 8 months ago

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 commented 8 months ago

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 commented 7 months ago

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 commented 7 months ago

@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.