Skip to content
This repository has been archived by the owner on Oct 19, 2023. It is now read-only.

multi-arch support #553

Open
killianhale-work opened this issue Jan 20, 2022 · 0 comments
Open

multi-arch support #553

killianhale-work opened this issue Jan 20, 2022 · 0 comments

Comments

@killianhale-work
Copy link

killianhale-work commented Jan 20, 2022

I am trying to run gcr.io/google-appengine/php on Docker Desktop for Mac on Apple silicon but I'm getting an error (see below), most likely due to the emulation of amd64.

2022-01-20 20:55:48,462 CRIT Supervisor running as root (no user in config file)
2022-01-20 20:55:48,468 WARN No file matches via include "/etc/supervisor/conf.d/*.conf"
2022-01-20 20:55:48,506 INFO supervisord started with pid 1
2022-01-20 20:55:49,521 INFO spawned: 'php-fpm' with pid 15
2022-01-20 20:55:49,528 INFO spawned: 'nginx' with pid 17
2022-01-20 20:55:50,524 INFO success: php-fpm entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2022-01-20 20:55:50,527 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2022-01-20 20:55:50,576 INFO exited: nginx (exit status 1; not expected)
2022-01-20 20:55:50,625 INFO spawned: 'nginx' with pid 21
2022-01-20 20:55:51,060 INFO exited: nginx (exit status 1; not expected)
2022-01-20 20:55:52,073 INFO spawned: 'nginx' with pid 28
2022-01-20 20:55:52,419 INFO exited: nginx (exit status 1; not expected)
2022-01-20 20:55:54,424 INFO spawned: 'nginx' with pid 31
2022-01-20 20:55:54,737 INFO exited: nginx (exit status 1; not expected)
2022-01-20 20:55:57,745 INFO spawned: 'nginx' with pid 34
nginx: [error] failed to initialize Lua VM in /etc/nginx/nginx.conf:113
[20-Jan-2022 20:55:50] NOTICE: fpm is running, pid 15
[20-Jan-2022 20:55:50] NOTICE: ready to handle connections
nginx: [error] failed to initialize Lua VM in /etc/nginx/nginx.conf:113
nginx: [error] failed to initialize Lua VM in /etc/nginx/nginx.conf:113
nginx: [error] failed to initialize Lua VM in /etc/nginx/nginx.conf:113
nginx: [error] failed to initialize Lua VM in /etc/nginx/nginx.conf:113
2022-01-20 20:55:58,036 INFO exited: nginx (exit status 1; not expected)
2022-01-20 20:55:59,038 INFO gave up: nginx entered FATAL state, too many start retries too quickly

Here's a note taken from docs.docker.com

Not all images are available for ARM64 architecture. You can add --platform linux/amd64 to run an Intel image under emulation. In particular, the mysql image is not available for ARM64. You can work around this issue by using a mariadb image.

However, attempts to run Intel-based containers on Apple silicon machines under emulation can crash as qemu sometimes fails to run the container. In addition, filesystem change notification APIs (inotify) do not work under qemu emulation. Even when the containers do run correctly under emulation, they will be slower and use more memory than the native equivalent.

It seems like it would be easy to add multi-arch support with buildx based on what I've found here. I tried to figure out how to do this myself but I got lost in this repo and wasn't sure how to actually build the docker image(s).

Could someone help me out?

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

No branches or pull requests

1 participant