Dockerfile icon indicating copy to clipboard operation
Dockerfile copied to clipboard

Please add ARM64 to the Nginx images

Open Carlgo11 opened this issue 5 years ago • 11 comments

As title states, the Nginx images only work with AMD64 architectures. Adding support for ARM architectures would allow users to run your images on smaller devices such as Raspberry Pis etc.

One way would be to use buildx to compile the images before pushing.

Carlgo11 avatar Aug 01 '20 02:08 Carlgo11

it will also be helpfull to run those images on m1 powered macs

rafaelget avatar Feb 07 '21 00:02 rafaelget

Any updates here? I need the same for Nginx and PHP

TracKer avatar Dec 11 '21 13:12 TracKer

Feel free to contribute

htuscher avatar Dec 12 '21 18:12 htuscher

I've just compared "webdevops/php-apache-dev:7.4" to "arm64v8/php:7.4-apache" on a new Macbook with an M1 Max ... e.g. theme compilation in Shopware 6 dropped from 35 seconds to below 3 seconds ... so there is a HUGE performance gap, the general docker performance with AMD based images is still pretty horrible... :( How can we help to build the Webdevops images for the ARM64 architecture to improve performance? Thanks!

smxsm avatar Dec 22 '21 07:12 smxsm

Hi, here an example/workaround (php-dev:7.4 + nginx:alpine - symfony application)

regular docker-compose (for linux) https://github.com/MedicalMundi/memu-job/blob/main/docker-compose.yml

docker-compose override for mac m1 https://github.com/MedicalMundi/memu-job/blob/main/docker-compose.override.apple-m1.yml.dist

Dockerfile for mac m1 https://github.com/MedicalMundi/memu-job/tree/main/docker/apple-m1

zerai avatar Dec 22 '21 10:12 zerai

@zerai thanks, yes, that fixes the webdevops containers to work at all. But it doesn't help with the performance, since all the base images are built with AMD architecture - they are running on M1 with that fix, but the performance is pretty much horrible, depending on what you are doing :)

You can see that if you go into a container and use e.g. "htop" to check the running processes. You will see that they are all running via QEMU, which makes them very slow, e.g. theme compilation - this is a "patched" Webdevops PHP Apache 7.4. image running on M1 Max: grafik If you are running a native arm64 image, there is no QUEMU at all and it is a lot faster - this is based on the "arm64v8/php:7.4-apache" image, running on M1 Max: grafik

But looking at the huge Webdevops Dockerfile repo, it looks like a lot of stuff needs to be touched to get a proper multiarch build... as described e.g. here https://medium.com/nttlabs/buildx-multiarch-2c6c2df00ca2

smxsm avatar Dec 22 '21 10:12 smxsm

I've been using the fork mentioned in the comment here https://github.com/webdevops/Dockerfile/pull/434#issuecomment-1497906354 and it has been working well for me. Is there any chance it could be merged into this repo? I'm not sure how.

DuncanFairley avatar Jan 03 '24 18:01 DuncanFairley